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

Home » Public Forums » archive » Re: Color BMP problems
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Color BMP problems [message #11289] Sat, 28 March 1998 00:00
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
James Fulton (jfulton@impulse.net) writes:

> I use the following lines to make a bitmap file of the active window and the
> resulting file seems to have different colors from the original when I view
> the file.
>
> TVLCT, R, G, B, /GET
> image = TVRD()
> WRITE_BMP, 'temp.bmp', image, R, G, B
>
> I am using Win95 with the screen set at 16 bits. I am also using the
> supplied color files that comes with IDL. Any ideas why?

Sure enough, the image you are getting back from Read_BMP
and the original image contain different values. But
in this case Write_BMP has nothing to do with it. TVRD
is the culprit.

Try this when your display is set to 16-bit (thousands
of colors):

loadct, 0
image = Dist(200)
window, 0, xsize=200, ysize=200
tv, image

test = TVRD()
window, 1, xsize=200, ysize=200
tv, test

You can already see slight difference in the images. On my
display the second test image seems to have some green-tinted
colors in it. Just to see that these differences are real,
type this:

tvscl, image - test

You would expect a black display, but that is not what you
get. This is the source of your troubles.

I get the same result in IDL 5.0.3 and 5.1 beta 2.

I don't know what to tell you, except that RSI has NEVER
claimed to support 16-bit color. It is only under the
rarest occasions that I ever run IDL in anything but
8-bit mode. When I do venture forth into 24-bit color space,
I am almost always sorry I did. :-(

I did hear from reliable sources that starting in IDL 5.1
24-bit color will be handled the same on ALL platforms.
This, at least, is good news. :-)

Cheers,

David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Previous Topic: Re: WORD 16 bit unsigned?
Next Topic: Re: Object graphics - some questions

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

Current Time: Fri Oct 10 05:06:20 PDT 2025

Total time taken to generate the page: 1.28229 seconds