Unpleasant "feature" in WRITE_PICT routine [message #1392] |
Fri, 08 October 1993 10:19 |
gurman
Messages: 82 Registered: August 1992
|
Member |
|
|
Some may consider this a feature, but:
There appears to be a problem with the user library routine
WRITE_PICT, when it is called with the optional color table parameters r, g, b.
Once the routine is called with all five parameters (e.g., WRITE_PICT,
filename, image, r, g, b), r, g, and b are clobbered, and cannot be used in
succeeding calls.
I believe the problem is with the following lines in WRITE_PICT:
r = r * 256L ;macs use ints for
g = g * 256L ;color values so move
b = b * 256L ;the values up
The left-hand side of these replacement statements should be
variables other than those used in the calling sequence, don't you think?
I have modified our local version by substituting:
r_mac = r * 256L ;macs use ints for
g_mac = g * 256L ;color values so move
b_mac = b * 256L ;the values up
and later, when the PICT color table is being constructed,
colors(0,*) = INDGEN(colorTable.ctSize + 1)
colors(1,*) = r_mac
colors(2,*) = g_mac
colors(3,*) = b_mac
Works for me....
I have sent the above text to support@rsinc.com.
Joe Gurman
--
J.B. Gurman / Solar Physics Branch / NASA Goddard Space Flight Center /
Greenbelt MD 20771 USA / gurman@uvsp.gsfc.nasa.gov
| Federal employees are prohibited from holding opinions while at |
| work. Therefore, any opinions expressed herein are somebody else's. |
|
|
|