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

Home » Public Forums » archive » Re: ION script - true colour
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
Re: ION script - true colour [message #48298] Mon, 10 April 2006 10:46 Go to next message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Greg,
from the manual:
"Direct Graphics
Images created using the IDL Direct Graphics commands are drawn to the IDL
Z-Buffer. The Z-Buffer is an 8-bit device that stores intensity values for
each pixel. These values are combined with the current color map to produce
the final output image. If you change the device in any IDL code that is
executed in an <ION_IMAGE> tag, you must make sure to change the device back
to the Z-Buffer and TV the final image to it."

I use object graphics to avoid this limitation. For the record: I learned
object graphics specifically for this one task and it is probably the only
time it ever shoes up in my codes! :-)

Haje



"greg michael" <greg.michael@gmail.com> wrote in message
news:1144689324.286686.231020@u72g2000cwu.googlegroups.com.. .
> Is it possible to use true colour with ION script? My program make an
> RGB output which ION handles like this...
>
> IDL> set_plot, 'Z'
> IDL> device, SET_RESOLUTION=[320,256]
>
> ...code...
>
> IDL> ion__img = tvrd()
> IDL> tvlct, ion__r, ion__g, ion__b, /GET
> IDL> ion__tmp = bytarr(3, 320, 256)
> IDL> ion__tmp[0, *, *] = ion__r[ion__img]
> IDL> ion__tmp[1, *, *] = ion__g[ion__img]
> IDL> ion__tmp[2, *, *] = ion__b[ion__img]
> IDL> ion__img = ion__tmp
> IDL> !QUIET = 1
> IDL> write_jpeg, 'C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\ion1452.jpg',
> ion__img, TRUE=1
>
> which is assuming that I'm using a colour table. Comes out b/w. You can
> choose between png8, png24 and jpeg24, but they all do the same. Don't
> seem to be any true options for the ION_IMAGE tag.
>
> regards,
> Greg
>
Re: ION script - true colour [message #48385 is a reply to message #48298] Tue, 11 April 2006 04:21 Go to previous message
greg michael is currently offline  greg michael
Messages: 163
Registered: January 2006
Senior Member
Thanks, Haje. It didn't occur to me to use object graphics for
something so simple... but that works fine. One more IDL quirk for the
collection.

I'm not on unix, so I can't try the Xvfb method, but thanks, Ken.

Greg
Re: ION script - true colour [message #48388 is a reply to message #48298] Mon, 10 April 2006 14:48 Go to previous message
K. Bowman is currently offline  K. Bowman
Messages: 330
Registered: May 2000
Senior Member
In article <e1e5mj$j5t$1@aplcore.jhuapl.edu>,
"Haje Korth" <haje.korth@nospam.jhuapl.edu> wrote:

> Greg,
> from the manual:
> "Direct Graphics
> Images created using the IDL Direct Graphics commands are drawn to the IDL
> Z-Buffer. The Z-Buffer is an 8-bit device that stores intensity values for
> each pixel. These values are combined with the current color map to produce
> the final output image. If you change the device in any IDL code that is
> executed in an <ION_IMAGE> tag, you must make sure to change the device back
> to the Z-Buffer and TV the final image to it."
>
> I use object graphics to avoid this limitation. For the record: I learned
> object graphics specifically for this one task and it is probably the only
> time it ever shoes up in my codes! :-)
>
> Haje

There is also the X-windows virtual frame buffer (Xvfb).

http://www.rsinc.com/services/techtip.asp?ttid=2382

I just tried this on my Mac (OS X 10.4.6). Xvfb apparently comes with the X
distribution, and it worked just as advertised. Very slick. I'm going to start
converting some background jobs I have to use it.

Ken Bowman
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: power law fitting for errors on both coordinates
Next Topic: Re: power law fitting for errors on both coordinates

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

Current Time: Wed Oct 08 11:39:32 PDT 2025

Total time taken to generate the page: 0.00534 seconds