Can't convert PDF to JPG: Image width exceeds user limit in IHDR
Posted: 2017-03-10T11:13:07-07:00
While trying to convert this PDF file into a JPG image I am seeing a Image width exceeds user limit in IHDR error:
I need it in 600 dpi.
In gimp I can convert it up to 590 dpi.
In IM it fails even with 500.
What I think that is strange is that the error message comes from png.c, while I am trying to convert it to a JPEG file.
Does IM try to internally convert it to PNG first?
With 300 it also fails, but with another message:
Version is:
Any ideas about this, please?
Code: Select all
$ convert -density 600 mapa_araraquara_atualizado_logradouros.pdf output.jpg
convert-im6.q16: Image width exceeds user limit in IHDR `/tmp/magick-15788p2oGUMyrtVs31' @ warning/png.c/MagickPNGWarningHandler/1656.
convert-im6.q16: Image height exceeds user limit in IHDR `/tmp/magick-15788p2oGUMyrtVs31' @ warning/png.c/MagickPNGWarningHandler/1656.
convert-im6.q16: Invalid IHDR data `/tmp/magick-15788p2oGUMyrtVs31' @ error/png.c/MagickPNGErrorHandler/1630.
convert-im6.q16: corrupt image `/tmp/magick-15788p2oGUMyrtVs31' @ error/png.c/ReadPNGImage/3968.
convert-im6.q16: no images defined `output.jpg' @ error/convert.c/ConvertImageCommand/3258.
In gimp I can convert it up to 590 dpi.
In IM it fails even with 500.
What I think that is strange is that the error message comes from png.c, while I am trying to convert it to a JPEG file.
Does IM try to internally convert it to PNG first?
With 300 it also fails, but with another message:
Code: Select all
$ convert -density 300 mapa_araraquara_atualizado_logradouros.pdf saida.jpg
convert-im6.q16: DistributedPixelCache '127.0.0.1' @ error/distribute-cache.c/ConnectPixelCacheServer/244.
convert-im6.q16: cache resources exhausted `/tmp/magick-15990uVPzMB2hDw4Z1' @ error/cache.c/OpenPixelCache/3945.
convert-im6.q16: no images defined `saida.jpg' @ error/convert.c/ConvertImageCommand/3258.
Code: Select all
Version: ImageMagick 6.9.7-4 Q16 x86_64 20170114 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules OpenMP
Delegates (built-in): bzlib djvu fftw fontconfig freetype jbig jng jp2 jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib