Skip to content

Commit

Permalink
introduce writemime_
Browse files Browse the repository at this point in the history
this is used as the lower level IO writemime. The higher level writemime
is in imagemagick and implements scaling and conversion
  • Loading branch information
SimonDanisch committed Oct 6, 2015
1 parent 28107f5 commit 690eb81
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/ImageMagick.jl
Original file line number Diff line number Diff line change
Expand Up @@ -240,5 +240,11 @@ end

permutedims_horizontal(img) = permutedims(img, permutation_horizontal(img))

function writemime_(io::IO, ::MIME"image/png", img::AbstractImage)
wand = image2wand(img, Images.mapinfo_writemime(img), nothing)
blob = getblob(wand, "png")
write(io, blob)
end
export writemime_

end # module

0 comments on commit 690eb81

Please sign in to comment.