regression bug when converting PDF images to PNG

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
donovaly
Posts: 43
Joined: 2004-10-04T16:24:55-07:00

regression bug when converting PDF images to PNG

Post by donovaly »

When I convert this PDF image
http://fkurth.de/uwest/bugreports/Resis ... etwork.pdf
to another format like a PNG using ImageMagick 6.5.7-3 on Windows XP:

Code: Select all

convert -define pdf:use-cropbox=true pdf:Resistance-Network.pdf png:testa.png
I get these errors:

**** Page has no /MediaBox attribute. Using the current page size.
Error: /stackunderflow in --index--
Operand stack:
--dict:6/6(L)-- 595.0 842.0 3
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval--
Dictionary stack:
--dict:1160/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:285/300(ro)(G)-- --dict:21/25(L)-- --dict:2/6(L)--

When I use ImageMagick 6.5.5-0, I don't get this error. The used PDF file has of course a Mediabox:
/MediaBox [ 0 0 252.422638 249.65715 ]
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: regression bug when converting PDF images to PNG

Post by magick »

Post a bug to the Ghostscript bug forum. ImageMagick uses this Ghostscript command line which shows the bug is in Ghostscript (or in the PDF):
  • gs -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pnmraw" -dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r72x72" -dUseCropBox "-sOutputFile=Resistance-Network.pnm" Resistance-Network.pdf
    **** Page has no /MediaBox attribute. Using the current page size.
    Error: /stackunderflow in --run--
    Operand stack:
    --dict:6/6(L)-- 612.0 792.0 3
    Execution stack:
    %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop --nostringval-- --nostringval-- 2 1 1 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval--
    Dictionary stack:
    --dict:1157/1684(ro)(G)-- --dict:1/20(G)-- --dict:75/200(L)-- --dict:75/200(L)-- --dict:106/127(ro)(G)-- --dict:285/300(ro)(G)-- --dict:21/25(L)-- --dict:2/6(L)--
    Current allocation mode is local
    GPL Ghostscript 8.70: Unrecoverable error, exit code 1
donovaly
Posts: 43
Joined: 2004-10-04T16:24:55-07:00

Re: regression bug when converting PDF images to PNG

Post by donovaly »

magick wrote:Post a bug to the Ghostscript bug forum. ImageMagick uses this Ghostscript command line which shows the bug is in Ghostscript (or in the PDF):
Thanks Magick, it is indeed a regression bug in GS 8.70, in GS 8.65, it works:
http://bugs.ghostscript.com/show_bug.cgi?id=690676
Post Reply