File tree Expand file tree Collapse file tree 1 file changed +25
-4
lines changed Expand file tree Collapse file tree 1 file changed +25
-4
lines changed Original file line number Diff line number Diff line change @@ -18,17 +18,38 @@ DevNotes
18
18
19
19
See also: [`makeImage`](@ref)
20
20
"""
21
- function toFormat (format:: DataType ,
22
- img:: AbstractMatrix{<:Colorant} )
21
+ function toFormat (
22
+ format:: Type{format"PNG"} ,
23
+ img:: AbstractMatrix{<:Colorant}
24
+ )
23
25
#
24
26
io = IOBuffer ()
25
27
pngSm = Stream (format, io)
26
28
save (pngSm, img) # think FileIO is required for this
27
29
take! (io)
28
30
end
29
31
30
- toFormat (img:: AbstractMatrix{<:Colorant} ) = toFormat (format " PNG" , img)
31
-
32
+ @deprecate toFormat (img:: AbstractMatrix{<:Colorant} ) toFormat (format " PNG" , img)
33
+
34
+
35
+ # # Using default FileIO together with ImageIO
36
+ # function DistributedFactorGraphs.packBlob(
37
+ # fmt::Type{format"PNG"},
38
+ # img::Union{<:AbstractMatrix{<:Colorant},<:AbstractMatrix{UInt8}}
39
+ # )
40
+ # blob = toFormat(fmt, img)
41
+ # mimetype = "image/png"
42
+ # return blob, mimetype
43
+ # end
44
+ # function DistributedFactorGraphs.unpackBlob(
45
+ # ::Type{format"PNG"},
46
+ # blob::Vector{UInt8}
47
+ # )
48
+ # io = IOBuffer(blob)
49
+ # ioStr = Stream{format"PNG"}(io)
50
+ # return load(ioStr)
51
+ # # ImageMagick.readblob(imgBytes)
52
+ # end
32
53
33
54
"""
34
55
$SIGNATURES
You can’t perform that action at this time.
0 commit comments