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

Home » Public Forums » archive » Re: transparent GIF pixels
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: transparent GIF pixels [message #21160 is a reply to message #21142] Thu, 10 August 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Kenneth Mankoff (mankoff@lasp.colorado.edu) writes:

> Is it possible to create transparent pixels?
>
> It appears from the help that you can, but only when you write png's to
> disk. I have tried this and have been unsuccessful.
>
> Anyways, i want to do it in a situation where i don't write and immediatly
> read just to get my transparencies. I would like to make them transparent
> while the image is in memory. And i would prefer gifs, not png's.
>
> thanks for any clues or pointers.

I'd try something like this with a 2D image:

transparentPixelValue = 100
indices = Where(image EQ transparentPixelValue, count)
IF count GT 0 THEN image[indices] = !P.Background
TV, image

Should work like a charm. :-)

If you mean transparent in the sense that you can
see through to something underneath the image (beside
the background), then you will have to do something
similar to this in the Z-graphics buffer with Polyfill.

And I should imagine there would be several object
graphics solutions too, should you need them.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@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
Previous Topic: No. of variables allowed?
Next Topic: Re: Dynamic menus on base widget using MBAR

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

Current Time: Tue Dec 02 08:20:01 PST 2025

Total time taken to generate the page: 1.67480 seconds