diff --git a/test/constructed_images.jl b/test/constructed_images.jl index 9c43d18..05c4835 100755 --- a/test/constructed_images.jl +++ b/test/constructed_images.jl @@ -3,6 +3,7 @@ using ImageShow # for show(io, ::MIME, img) & ImageMeta using Test using ImageCore using Random, Base.CoreLogging +import Pkg mutable struct TestType end @@ -359,4 +360,20 @@ mutable struct TestType end img = ImageMagick.load("images/cameraman.tif") @test size(img) == (512, 512) end + + if VERSION >= v"1.6" || Sys.which("gs") !== nothing + @testset "PDF" begin + pdf = ImageMagick.load("images/FLAT_-_What_is_Creative_Commons.pdf") + @test size(pdf) == (405, 720, 10) + + fn = joinpath(workdir, "cc.pdf") + ImageMagick.save(fn, pdf) + @test ImageMagick.load(fn) == pdf + + pdf_100dpi = ImageMagick.load("images/FLAT_-_What_is_Creative_Commons.pdf"; dpi=100) + @test size(pdf_100dpi) == (563, 1000, 10) + end + else + @warn "skipping PDF tests" + end end diff --git a/test/images/FLAT_-_What_is_Creative_Commons.pdf b/test/images/FLAT_-_What_is_Creative_Commons.pdf new file mode 100644 index 0000000..7048ad7 Binary files /dev/null and b/test/images/FLAT_-_What_is_Creative_Commons.pdf differ