Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ImageMagick.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ end

# This differs from `save_` for files because this is primarily used
# by IJulia, and we want to restrict large images to make display faster.
function save_(s::Stream, img, permute_horizontal=true; mapi = clamp01nan, quality = nothing)
wand = image2wand(img, mapi, quality, permute_horizontal)
function save_(s::Stream, img, permute_horizontal=true; mapi = clamp01nan, quality = nothing, kwargs...)
wand = image2wand(img, mapi, quality, permute_horizontal; kwargs...)
blob = getblob(wand, formatstring(s))
write(stream(s), blob)
end
Expand Down
11 changes: 10 additions & 1 deletion test/constructed_images.jl
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ mutable struct TestType end
orig_img = ImageMagick.load(joinpath(workdir, "2by2.png"))
fn = joinpath(workdir, "2by2_fromstream.png")
open(fn, "w") do f
ImageMagick.save(Stream(format"PNG", f), orig_img)
ImageMagick.save(Stream{format"PNG"}(f), orig_img)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting how much disruption this depwarn causes. Tests will fail unless FileIO >= 1.6, but I guess we can live with that, and it won't happen in CI or an update test environment.

end
img = ImageMagick.load(fn)
@test img == orig_img
Expand Down Expand Up @@ -279,6 +279,15 @@ mutable struct TestType end
readimage(wand, fn)
resetiterator(wand)
@test ImageMagick.getimagedelay(wand) == 50

fn = joinpath(workdir, "animated.gif")
open(fn, "w") do io
ImageMagick.save(FileIO.Stream{format"GIF"}(io), A, fps=2)
end
wand = MagickWand()
readimage(wand, fn)
resetiterator(wand)
@test ImageMagick.getimagedelay(wand) == 50
end

@testset "ImageMeta" begin
Expand Down
Binary file added test/images/test-exiforientation.zip
Binary file not shown.
5 changes: 2 additions & 3 deletions test/readremote.jl
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,8 @@ end
end

@testset "EXIF orientation" begin
url = "http://magnushoff.com/assets/test-exiforientation.zip"
fn = joinpath(workdir, "test-exiforientation.zip")
download(url, fn)
# downloaded from http://magnushoff.com/assets/test-exiforientation.zip
fn = joinpath(@__DIR__, "images", "test-exiforientation.zip")
first_img = true
r = ZipFile.Reader(fn)
local img0
Expand Down