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

Home » Public Forums » archive » 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 #11507 is a reply to message #11290] Wed, 01 April 1998 00:00 Go to previous messageGo to previous message
dwc is currently offline  dwc
Messages: 2
Registered: April 1998
Junior Member
In article <6fjn2o$6kh$1@sienna.impulse.net>, jfulton@impulse.net says...
>
> 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?
>

This may be due to the Microsoft primary ordering which is BGR not RGB. The
following code works fine on 16bit/24bit displays under Win95:

save_bmp = 'foobar.bmp'
bmp_image = TVRD(/TRUE)
; change from RGB to BGR for .BMP
chan_temp = bmp_image[0,*,*]
bmp_image[0,*,*] = bmp_image[2,*,*]
bmp_image[2,*,*] = chan_temp
write_bmp, save_bmp, TEMPORARY(bmp_image)

I have found that Truecolor graphics work great under 5.0.2 - I avoid using
color tables and color indexes as much as possible.

Dave Coulter
dwc@nel.newmont.com
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: PV-Wave, Fortran & Windows NT
Next Topic: Re: Calling fortran procedures from IDL

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

Current Time: Thu Oct 16 02:16:07 PDT 2025

Total time taken to generate the page: 1.67933 seconds