Obtaining 24-Bit PostScript Output
QUESTION: Is it possible to get 24-bit PostScript output in IDL?
ANSWER: The short answer to this question is no, it is not possible as of IDL 6.2 when this article was updated.
Note: 24-bit color PostScript was introduced in IDL 7.1. It can be turned on by setting the DECOMPOSED keyword to 1 with the Device command. Or, more commonly, it is set with the Coyoyte Library SetDecomposedState command, which takes into account version- and device-specific information when the color decomposition state is set.
It is possible to display a 24-bit image in PostScript, but it is done in the same way it is possible to display a 24-bit image in an 8-bit display window in IDL: by using the True keyword with the TV command. For example, with a 24-bit pixel interleaved image:
Set_Plot, 'PS' Device, /Color, Bits_per_Pixel=8 TV, image24, True=1 Device, /Close_File
But it is not possible to specify a color directly as a 24-bit value. For example, it is not possible to display a green plot on a gray background with a yellow data line by typing commands like these, even though the commands work perfectly well on a 24-bit display with color decomposition turned on.
Set_Plot, 'PS' Plot, data, Color='00FF00'xL, Background='707070'xL, /NoData OPlot, data, Color='00FFFF'xL Device, /Close_File
Copyright © 2006 David W. Fanning
Written: 11 January 2006
Last Updated: 10 November 2009