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

Home » Public Forums » archive » Re: Map transparent image
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: Map transparent image [message #35682 is a reply to message #35681] Tue, 01 July 2003 12:51 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Michael A. Miller writes:

> One method that you might like is alpha blending. If you have
> two images with two different colors (from two color maps say),
> calculate a new color map like
>
> RGB = BYTE( alpha * FLOAT(baseRGB) + (1.0 - alpha) * FLOAT(overlayRGB) )
>
> where the *RGB are RGB 3-tuples. You can do this by hand, so to
> speak, in your own code if you are using direct graphics, or you
> can use the alpha blending that is built into object graphics.

Oh, yes, that looks nice. Here is a little example
if you happen to have some of my programs hanging around
and a 24-bit display.

Window
LoadCT, 5
TVImage, LoadData(7)
a = TVRead()
LoadCT, 0
TVImage, (LoadData(5) GT 40) * 255B
b = TVRead()
alpha = 0.5
rgb = BYTE( alpha * FLOAT(a) + (1.0 - alpha) * FLOAT(b) )
TVImage, rgb

*Very* slick!

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL from crontab going defunct?
Next Topic: cwavefor

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

Current Time: Wed Oct 08 19:29:25 PDT 2025

Total time taken to generate the page: 0.00348 seconds