comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Postscript color problem
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Postscript color problem [message #41119] Thu, 30 September 2004 13:26
K. Bowman is currently offline  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
[Message index]
 
Read Message
Previous Topic: Re: colorbars in contourplots
Next Topic: Re: Postscript color problem

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 06:36:48 PDT 2025

Total time taken to generate the page: 0.95672 seconds