Test-suite fails with ImageMagick >=7.1.2-9
Brought to you by:
ra28145
With ImageMagick >=7.1.2-9 the test suite fails with
# Failed test 'undefined'
# at t/04_Page.t line 114.
# got: '72'
# expected: '300'
# Looks like you failed 1 test of 12.
I bisected ImageMagick 7.1.2-8..7.1.2-9 to commit f46647c030 (»Correct parsing of the density«), which sound totally plausible.
Unfortunately, I don't have the expertise to fix this myself, so I cannot provide a patch. But at least you should know quite well what's going on. :)
Addendum: I'm trying to build gscan2pdf-2.13.5 with perl-5.40.0 on NixOS 25.11.
Last edit: Andreas Wiese 2025-12-19
Thanks for the report. Debian testing still has 7.1.2-8, so I can't reproduce this. Please try the following with 7.1.2-9 and attach the jpg to the report:
magick -units Undefined -density 300 xc:white test.jpgWhat does the following then return?
identify -verbose test.jpgIf you compare the output of identify, whereas in previous versions, the resolution metadata was still present in the image, plus the undefined units, in this new version, the resolution is completely missing. I'm calling this a bug in Imagemagick.
Okay, so I filed a bug against ImageMagick (I hope to have gotten this right). But I'm not quite convinced here. So yes,
identifydoesn't report a resolution anymore, but isn't this actually correct without a unit? I mean, what does 300x300 tell without a unit?Edit:
Okay, the bug report leading to the breaking commit explains this for agnostic people like me:
Last edit: Andreas Wiese 2025-12-21
300x300 without a unit should normally default to dots (pixels) per inch. And living in a land that uses SI units, I would be also happy for it to default to pixels per cm. But the new behaviour ends up being 72 ppi, which makes far less sense than anything else.
This bug has now hit Debian sid. I'll have to skip the test in sid to avoid FTBFS. Your bug report is now seeing some attention.