Skip to content

Commit 6fe954c

Browse files
committed
add tests
1 parent 9cc3e3f commit 6fe954c

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

test/constructed_images.jl

+16
Original file line numberDiff line numberDiff line change
@@ -359,4 +359,20 @@ mutable struct TestType end
359359
img = ImageMagick.load("images/cameraman.tif")
360360
@test size(img) == (512, 512)
361361
end
362+
363+
if VERSION >= v"1.6" || Sys.which("gs") !== nothing
364+
@testset "PDF" begin
365+
pdf = ImageMagick.load("images/FLAT_-_What_is_Creative_Commons.pdf")
366+
@test size(pdf) == (405, 720, 10)
367+
368+
fn = joinpath(workdir, "cc.pdf")
369+
ImageMagick.save(fn, pdf)
370+
@test ImageMagick.load(fn) == pdf
371+
372+
pdf_100dpi = ImageMagick.load("images/FLAT_-_What_is_Creative_Commons.pdf"; dpi=100)
373+
@test size(pdf_100dpi) == (563, 1000, 10)
374+
end
375+
else
376+
@warn "skipping PDF tests"
377+
end
362378
end
99.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)