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
Cannot write extremely wide PNG files
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Cannot write extremely wide PNG files
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
Re: Cannot write extremely wide PNG files
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
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.
It turns out that what's actually happening is that the "Preview" app on MacOS can't display it. Photoshop displays it fine.