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

Home » Public Forums » archive » Re: color problem when capture the object window
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 problem when capture the object window [message #38592 is a reply to message #38560] Fri, 12 March 2004 09:20 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Songtao Liu writes:

> I write the captured screen images to a bmp file and when I look at
> the bmp file, I found the color is not what it looks like on the
> screen.
>
> It is just a simple widget program, with several object graphic
> windows, each display an image and ROIs(draw with plot object).
>
> Followings are the codes to capture the screen display and write them
> to the disk
>
> ;capture the window display
> draw_id -> getProperty, image_data = data
> ;write to file
> write_bmp, filename, data

Oh, right. For some reason, when you create 24-bit color BMP
files, Microsoft wants them in the form of BGR rather than RGB.
(Don't ask me, I don't have the foggiest idea.)

So just flip your red and blue image planes and you will
be good to go. I typically avoid this problem by writing
8-bit BMP files with color tables. See my XImage program,
for example.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Announcing GDL 0.7, now with PLOT command
Next Topic: Poisson eq solver?

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

Current Time: Sun Oct 12 16:32:35 PDT 2025

Total time taken to generate the page: 0.01243 seconds