Skip to content

Commit eb291b7

Browse files
committed
add tests
1 parent 9cc3e3f commit eb291b7

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

test/constructed_images.jl

+17
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ using ImageShow # for show(io, ::MIME, img) & ImageMeta
33
using Test
44
using ImageCore
55
using Random, Base.CoreLogging
6+
import Pkg
67

78
mutable struct TestType end
89

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

0 commit comments

Comments
 (0)