Cannot write extremely wide PNG files

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
jwz
Posts: 2
Joined: 2018-06-16T16:52:49-07:00
Authentication code: 1152

Cannot write extremely wide PNG files

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Cannot write extremely wide PNG files

Post 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
snibgo's IM pages: im.snibgo.com
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Cannot write extremely wide PNG files

Post 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.
User avatar
jwz
Posts: 2
Joined: 2018-06-16T16:52:49-07:00
Authentication code: 1152

Re: Cannot write extremely wide PNG files

Post 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.
Post Reply