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 #35680 is a reply to message #35679] Tue, 01 July 2003 12:49 Go to previous messageGo to previous message
Haje Korth is currently offline  Haje Korth
Messages: 651
Registered: May 1997
Senior Member
Michael,
this is a neat formula and I will print it for safe-keeping. I am fiddling
with the object graphics alpha blending and it works nicely. I knew this
could be reduced to one line of code, I just couldn't figure it out!

Thanks,
Haje


"Michael A. Miller" <mmiller3@iupui.edu> wrote in message
news:87vfumnjbh.fsf@lumen.indyrad.iupui.edu...
>>>> >> "Haje" == Haje Korth <haje.korth@jhuapl.edu> writes:
>
>> I am trying to overlay a grey-shaded mask over an image to
>> indicate areas where sample data are less
>> reliable. However, I want the grey shaded area to be
>> transparent so that I can still see the underlying data
>> points.
> ...
>> Does anyone know, how the mask can be worked into the image
>> prior to display? What is the math that one would apply?
>
> 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.
>
> Mike
>
> --
> Michael A. Miller mmiller3@iupui.edu
> Imaging Sciences, Department of Radiology, IU School of Medicine
[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:31:37 PDT 2025

Total time taken to generate the page: 0.00405 seconds