Postscript color problem [message #41119] |
Thu, 30 September 2004 13:26 |
K. Bowman
Messages: 330 Registered: May 2000
|
Senior Member |
|
|
I have a program that displays a horizontal 24-bit (RGB) color bar. The
color bar is an (ncolors x 2 x 3) array.
Here's an example with 60 colors changing from blue to red:
IDL> help, image
IMAGE BYTE = Array[60, 2, 3]
Here are the RGB values of the first 10 columns
IDL> print, image[0:9,0,*]
0 7 15 23 31 39 47 55 63 71
0 7 15 23 31 39 47 55 63 71
255 255 255 255 255 255 255 255 255 255
The first column is pure blue (0, 0, 255). In succeeding columns the R
and G values increase so the color shifts toward white.
Sending this image to the screen with TV (using CONGRID) works fine.
Here is the Postscript output from the same program using (values are
hexadecimal)
00 00 b2 17 1f 27 2f 37 3f 47
00 ff b2 17 1f 27 2f 37 3f 47
ff ff ff ff ff ff ff ff ff ff
Translated to decimal, this is
0 0 178 23 31 39 47 55 63 71
0 255 178 23 31 39 47 55 63 71
255 255 255 255 255 255 255 255 255 255
The R and G values of the second and third columns are wrong (e.g., the
value in the second column (0, 255, 255) is cyan). After that
everything is OK. The same thing happens at the other end of the table.
The second and third elements from the end are wrong, and of course, the
colors in the graphic are wrong at those locations.
Any ideas?
Ken Bowman
|
|
|