I am seeing some rendering problems with gradients in a particular PDF file. These problems seem to be exaggerated after an intermediate step of converting to PS. These tests were done with GPLed 8.60, but I was also seeing the same problem with AFPLed 8.53. The PDF in question (not attached) is: http://www.xmradio.com/pdf/channel_guide.pdf Pay close attention to gradients on the rendered output. I’ll be using the "Soul Street" logo for an example, but this affects many other parts of the PDF. I've attached a screen scrape from Adobe Reader 7.0.7. This is how I would expect the rendered output to look. The outline of the logo is smooth on both the "interior" (the side touching the gradient) and "exterior" of the logo and the gradient is smooth. Ghostscript rendering the PDF using png16m: gswin32c.exe -dSAFER -dBATCH -dNOPAUSE –r1000 -dGraphicsAlphaBits=4 - dTextAlphaBits=4 -sDEVICE=png16m -sOutputFile=C:\gs-test\pdf2png16m.png c:\gs- test\channel_guide.pdf The gradient is still smooth, but the interior of the outline is jaggy. Now using pngalpha: gswin32c.exe -dSAFER -dBATCH -dNOPAUSE -r1000 -dGraphicsAlphaBits=4 - dTextAlphaBits=4 -sDEVICE=pngalpha -sOutputFile=C:\gs-test\pdf2pngA.png c:\gs- test\channel_guide.pdf The gradient now has visible banding. Something that exaggerates the problem is to go PDF->PS->PNG: gswin32c.exe -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pswrite -sOutputFile=C:\gs- test\tmp.ps c:\gs-test\channel_guide.pdf gswin32c.exe -dSAFER -dBATCH -dNOPAUSE -r1000 -dGraphicsAlphaBits=4 - dTextAlphaBits=4 -sDEVICE=png16m -sOutputFile=C:\gs-test\3step16m-4.png c:\gs- test\tmp.ps The gradient here looks very bad. Interior of the outline is jaggy. PDF->PS->PNG with no AlphaBits option causes the gradient to appear correct, but back come the jaggies. So, there are several issues I'm seeing here: 1) The interior outline of this logo looks very jagged while the exterior outline looks smooth. 2) pngalpha produces banding while png16m doesn't. This doesn't make much sense to me as the RGB colorspace should be the same. 3) PDF->PS->PNG produces nasty artifacts with alphabits in these gradient regions. (why would this render different than just PDF->PNG?)
Created attachment 3521 [details] Adobe Reader 7.0.7 rendering
Created attachment 3522 [details] PDF->png16m output
Created attachment 3523 [details] PDF->pngalpha output
Created attachment 3524 [details] PDF->PS->png16m with graphicalphabits=4
Created attachment 3525 [details] PDF->PS->png16m with graphicalphabits=0
Created attachment 3529 [details] channel_guide.pdf Original file, attached for archival purposes.
Bug still reproducible in Ghostscript 9.03
Fixed with http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=84fec37351ebd502c70ac16347fae4b1b5f5cbe6