Open johnnychen94 opened 2 years ago
It turns out this version also breaks TIFF loading:
julia> using ImageMagick, TestImages
julia> filepath = testimage("camera", download_only=true)
"/Users/jc/.julia/artifacts/e752bdc739f34d02e79c7fa834bc2f2e0d71c7e0/cameraman.tif"
julia> ImageMagick.load(filepath)
ERROR: /Users/jc/.julia/artifacts/e752bdc739f34d02e79c7fa834bc2f2e0d71c7e0/cameraman.tif: Null count for "Tag 34022" (type 1, writecount -3, passcount 1). `_TIFFVSetField' @ error/tiff.c/TIFFErrors/540
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] error(wand::MagickWand)
@ ImageMagick ~/.julia/packages/ImageMagick/b8swT/src/libmagickwand.jl:187
[3] readimage
@ ~/.julia/packages/ImageMagick/b8swT/src/libmagickwand.jl:274 [inlined]
[4] load_(file::String, permute_horizontal::Bool; ImageType::Type, extraprop::String, extrapropertynames::Nothing, view::Bool)
@ ImageMagick ~/.julia/packages/ImageMagick/b8swT/src/ImageMagick.jl:146
[5] load_ (repeats 2 times)
@ ~/.julia/packages/ImageMagick/b8swT/src/ImageMagick.jl:139 [inlined]
[6] #load#30
@ ~/.julia/packages/ImageMagick/b8swT/src/ImageMagick.jl:126 [inlined]
[7] load(::String)
@ ImageMagick ~/.julia/packages/ImageMagick/b8swT/src/ImageMagick.jl:126
[8] top-level scope
@ REPL[8]:1
@staticfloat if possible, could you help investigate this?
FYI: bisected the test failures to https://github.com/ImageMagick/ImageMagick6/commit/a1a71cb6c494c98808a91a23224451667cf719e1
Edit: TIFF loading is a separate issue unfortunately, so simply reverting that commit is not enough
The PNG stuff here seems to work correctly now with ImageMagick 6.9.12. The TIFF stuff still has the same error. There's also 6.9.13 upstream, which perhaps fixes the TIFF issue. Is that worth trying?
On M1, the bigger issue is that 6.9.10 is too old and doesn't work at all.
There's also 6.9.13 upstream, which perhaps fixes the TIFF issue. Is that worth trying?
I simply tried
diff --git a/Project.toml b/Project.toml
index 9e47aa8..fb6cacf 100644
--- a/Project.toml
+++ b/Project.toml
@@ -11,7 +11,7 @@ InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
[compat]
FileIO = "1"
ImageCore = "0.9, 0.10"
-ImageMagick_jll = "= 6.9.11"
+ImageMagick_jll = "= 6.9.13"
julia = "1.6"
[extras]
but I still get
issue #206: Error During Test at /Users/mose/.julia/dev/ImageMagick/test/constructed_images.jl:359
Got exception outside of a @test
/Users/mose/.julia/artifacts/0fca6f56665d8dfa11bad924ab67e24e6fdbc0d7/cameraman.tif: Null count for "Tag 34022" (type 1, writecount -3, passcount 1). `_TIFFVSetField' @ error/tiff.c/TIFFErrors/542
For the record, our ImageMagick_jll@6.9.13 currently corresponds to upstream version 6.9.13-6: https://github.com/JuliaPackaging/Yggdrasil/blob/24010c93241559f44b967496e65782a9d18729f0/I/ImageMagick/ImageMagick%406/build_tarballs.jl#L5. I guess someone will have to report the issue upstream with a C reproducer, otherwise no one will look into this.
Actually, this seems to be https://github.com/ImageMagick/ImageMagick/issues/2015, which is apparently a bug in libtiff, still open: https://gitlab.com/libtiff/libtiff/-/issues/110. https://github.com/ImageMagick/ImageMagick/issues/2015#issuecomment-1445173147 suggests
I used the workaround of first running the images through
tiff2rgba
(which strips those unknown tags, apparently), and then runningconvert
on them.
Maybe we can do something similar? What's tiff2rgba
?
I have the same problem.
I decided to upgrade ImageMagick 6.9.12-93 Q16 x86_64 17898
to ImageMagick 6.9.13-14 Q16 x86_64 18442
But that had no effect.
On an old test server I have ImageMagick 6.8.9-9 Q16 x86_64
which is working perfectly.. quite frustrating!
using ImageMagick_jll v6.9.12-0 (https://github.com/JuliaPackaging/Yggdrasil/pull/3424):
If reverted to
ImageMagick_jll@6.9.10-12+3
, it is:cc: @staticfloat @timholy