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

Home » Public Forums » archive » color labrynth
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
color labrynth [message #29960] Tue, 26 March 2002 08:19
HILBERMAN is currently offline  HILBERMAN
Messages: 7
Registered: July 2001
Junior Member
Hello all,

I am caught in the middle of a 24-bit v. 8-bit ping pong match for color
graphics and my brain is starting to hurt. Need help.

THE PROBLEM: When I plot a perfectly beautiful, multi-color graph and
try to save it to a bitmap file, the color is either not preservered
(i.e. seems to revert to the B&W indexed color model?), or it is not
preserved AND the lines are faint to none. (Depending, it seems, on
whether or not I choose decomposed equal to 1 or 0.)

THE PLATFORM: I have been toying with the problem on a Sun Solaris 8,
although I have also bounced over to the IDL on my Windows 2000 to see
if it makes a difference (it doesn't).

As mentioned above, I have varied the device values (mainly Decomposed
and True_Color), but I haven't found a solution. Clearly, this arena
of 8-bit v. 24-bit color tables is new to me, and I would appreciate any
help you may have.

Here is a pseudo code of the type I have been playing with:
________________________________________________

pro test_plot

;******************************************
;Dummy variables and dummy functions to plot
;******************************************

x = indgen(50)

y = x^3
yy = x^2 + 2

;**********************************************
;device manipulation and color array definition
;**********************************************

device, True_Color = 24, Decomposed = 1
colarr = ['000000'XL, '7FABFF'XL, 'FF2200'XL]

;************
;Plot functions
;*************

plot, yy, background = 'FFFFFF'XL, color = colarr[2], $
linestyle = 0, Xstyle = 1, xtitle = 'Time (days)', $
ytitle = 'Discharge (m3/s)', title = 'Test1'
oplot, y, color = colarr[1], linestyle = 0

write_bmp, '~/test.bmp', tvrd()

end
~
___________________________________________________________

Even though I'm not clear on the correct usage of 'device', I have a
feeling
that the error stems from using tvrd() to write the bitmap????

Thanks,
Rachael
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Transparent texture mapped polygons
Next Topic: Re: Image scale as 0 - 4096 instead of 0 - 255

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

Current Time: Wed Oct 08 20:06:08 PDT 2025

Total time taken to generate the page: 0.00541 seconds