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

Home » Public Forums » archive » Re: Inexplicable tvrd() behavior
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: Inexplicable tvrd() behavior [message #52810] Fri, 02 March 2007 13:00
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
BillG writes:

> Can some one explain this behavior and offer a solution?
>
> In direct graphics, indexed color mode,
> 1. I create a color plot in a window,
> 2. read in back in with image1=tvrd()
> 3. plot it again in another window.
>
> I would expect (want) that the two windows would be identical but they
> appear quite different: the image in the second window appears to be
> (image1*4 < 255). The following program illustrates the problem.
>
> (Why indexed color? I want to create an color indexed png of the image
> but the resulting png looks like the image in window2)
> (Usual disclaimer: there is an explanation and solution obvious to
> anyone with any idl experience but its Friday, I have a
> headache , .... Also, I have read Fanning's Chapter 3 'Working with
> Color' to no avail)

The explanation is quite tedious, but is explained fully
here:

http://www.dfanning.com/color_tips/strange_tvrd.html

One solution is to make the window you are going to copy
the image out of in the Z-Graphics buffer rather than on your
display. That option is explained near the bottom of the
article above.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Inexplicable tvrd() behavior
Next Topic: Re: Optimizing a lookup table

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

Current Time: Wed Oct 08 19:42:56 PDT 2025

Total time taken to generate the page: 0.00607 seconds