[Pkg-gmagick-im-team] Bug#1115346: magick's conversion from a scanned and processed PNG to PDF adds additional stripes to the top and right

Peter Müller PeterMueller at ro.ru
Mon Sep 15 21:05:25 BST 2025


Package: imagemagick-7.q16
Version: 8:7.1.1.43+dfsg1-1+deb13u2
Control: affects -1 evince loupe gimp mupdf sane-utils


The input file is a tall rectangle with a cross, i.e., a tall version of ☒ or ⛝, as shown by `loupe input.png` or `gimp input.png`.  The file was originally produced by processing in GIMP a page scanned with scanimage.

Run

     convert input.png output.pdf

or

     magick input.png output.pdf

followed by `evince output.pdf` or `mupdf output.pdf`. Observe that in the output, you get additional white stripes at the top and to the right.

The same goes when you specify the options `-compress JPEG2000 -quality 50` to `convert`.

This is surprising; compare this to what you get when the input is https://www.debian.org/logos/openlogo-100.png .  From a user's viewpoint, the aforementioned tools produce inconsistent results, so at least one of them should be improved (feel free to reassign if necessary).

Moreover, the generated image seems to have more points than there are pixels in the original:

     $ file input.png
     input.png: PNG image data, 9591 x 13758, 8-bit grayscale, non-interlaced
     $ pdfinfo output.pdf | grep "Page size"
     Page size:       10206 x 14036 pts

(Off-topic: I also have an uncleaned scanned and processed page, which I choose to keep nondisclosed here, that shows an even worse error.)

Gratefully,
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: input.png
Type: image/png
Size: 209040 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-gmagick-im-team/attachments/20250915/c6860c54/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output.pdf
Type: application/pdf
Size: 241516 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-gmagick-im-team/attachments/20250915/c6860c54/attachment-0001.pdf>


More information about the Pkg-gmagick-im-team mailing list