Strange grey squares when viewing postscript file
Posted: 2009-03-10T07:15:04-07:00
I originally posted this problem to the users list on Tue Feb 17, 2009 2:41 am. The problem was that ImageMagick 6.4.3 produces strange grey squares on the plot when using the display command on a postscript file. This is the case on OpenSuse 11.1 32 and 64 bit systems. The snapshot of the screen (test.png), original postscript file (idl.ps) and output PNG file (idl.png) can be seen at:
http://ncas-climate.nerc.ac.uk/ajh/imagemagick
The problem is that ImageMagick 6.4.3 calls gs with "-sDEVICE=pngalpha" rather than "-sDEVICE=pnmraw" which is the case with ImageMagick 6.3.5. The following code is slightly modified to show the problem.
This is what is executed when doing display idl.ps on ImageMagick 6.4.3:
"gs" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 \
-dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pngalpha" -dTextAlphaBits=4 \
-dGraphicsAlphaBits=4 "-r89.9986x89.9986" -g744x1051 \
"-sOutputFile=idl.png" "-fidl.ps"
This is what is executed when doing display idl.ps on ImageMagick 6.3.5:
"gs" -q -dQUIET -dSAFER -dPARANOIDSAFE -dBATCH -dNOPAUSE -dNOPROMPT \
-dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pnmraw" \
-dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r89.9986x89.9986" "-g744x1051" \
"-r89.9986x89.9986" "-sOutputFile=idl2.png" "-fidl.ps"
When I execute the above commands on an OpenSuse 10.3 or 11.1 system (ImageMagick 6.3.5 and ImageMagick 6.4.3 respectively) I get:
strange grey squares when using display idl.png ("-sDEVICE=pngalpha")
a normal white background when using display idl2.png ("-sDEVICE=pnmraw")
Is this a bug or a feature? Is there a flag I can set on ImageMagick 6.4.3 to use pnmraw rather than pngalpha when using display command on postscript files?
Best Regards
Andy
http://ncas-climate.nerc.ac.uk/ajh/imagemagick
The problem is that ImageMagick 6.4.3 calls gs with "-sDEVICE=pngalpha" rather than "-sDEVICE=pnmraw" which is the case with ImageMagick 6.3.5. The following code is slightly modified to show the problem.
This is what is executed when doing display idl.ps on ImageMagick 6.4.3:
"gs" -q -dQUIET -dPARANOIDSAFER -dBATCH -dNOPAUSE -dNOPROMPT -dMaxBitmap=500000000 \
-dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pngalpha" -dTextAlphaBits=4 \
-dGraphicsAlphaBits=4 "-r89.9986x89.9986" -g744x1051 \
"-sOutputFile=idl.png" "-fidl.ps"
This is what is executed when doing display idl.ps on ImageMagick 6.3.5:
"gs" -q -dQUIET -dSAFER -dPARANOIDSAFE -dBATCH -dNOPAUSE -dNOPROMPT \
-dMaxBitmap=500000000 -dAlignToPixels=0 -dGridFitTT=0 "-sDEVICE=pnmraw" \
-dTextAlphaBits=4 -dGraphicsAlphaBits=4 "-r89.9986x89.9986" "-g744x1051" \
"-r89.9986x89.9986" "-sOutputFile=idl2.png" "-fidl.ps"
When I execute the above commands on an OpenSuse 10.3 or 11.1 system (ImageMagick 6.3.5 and ImageMagick 6.4.3 respectively) I get:
strange grey squares when using display idl.png ("-sDEVICE=pngalpha")
a normal white background when using display idl2.png ("-sDEVICE=pnmraw")
Is this a bug or a feature? Is there a flag I can set on ImageMagick 6.4.3 to use pnmraw rather than pngalpha when using display command on postscript files?
Best Regards
Andy