Page 1 of 1

Cannot write extremely wide PNG files

Posted: 2018-06-16T17:02:36-07:00
by jwz
This works:

convert rose: -resize '34040x256!' out.png

But this produces an image that is solid blue:

convert rose: -resize '34041x256!' out.png

I'm doing this because I have a 1-bit 127296x256 PBM image that I need to convert to PNG. ImageMagick can't convert it, but "pnmtopng" can (which proves that the PNG format is capable of representing images of that size).

Version: ImageMagick 7.0.7-31 Q16 x86_64 2018-05-08 https://www.imagemagick.org
Features: Cipher DPC HDRI
Delegates (built-in): bzlib djvu fftw fontconfig freetype gslib gvc jbig jng jp2 jpeg lcms lzma openexr pangocairo png ps raw tiff webp xml zlib

Re: Cannot write extremely wide PNG files

Posted: 2018-06-16T17:10:14-07:00
by snibgo
Results from v6.9.5-3 and 6.9.9-40 and 7.0.7-28 on Windows 8.1 are fine:

Code: Select all

f:\web\im>%IM%convert rose: -resize "34041x256!" x.png
f:\web\im>%IMDEV%convert rose: -resize "34041x256!" x.png
f:\web\im>%IMG7%magick rose: -resize "34041x256!" x.png

Re: Cannot write extremely wide PNG files

Posted: 2018-06-16T17:15:18-07:00
by magick
We're getting expected results with ImageMagick 7.0.8-0 and libpng 1.6.34 with Linux. The out.png image is a skewed rose as expected and we could also create a 127296x256 1-bit PNG.

Re: Cannot write extremely wide PNG files

Posted: 2018-06-16T17:16:27-07:00
by jwz
Ugh, sorry. False alarm. Not an ImageMagick bug.

It turns out that what's actually happening is that the "Preview" app on MacOS can't display it. Photoshop displays it fine.