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

Home » Public Forums » archive » transparent GIF pixels
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
transparent GIF pixels [message #21166] Thu, 10 August 2000 00:00 Go to next message
Kenneth Mankoff is currently offline  Kenneth Mankoff
Messages: 42
Registered: August 1999
Member
Hi all,

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.

-ken.
Re: transparent GIF pixels [message #21266 is a reply to message #21166] Fri, 11 August 2000 00:00 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
We have been playing around with ION for a few months now. Although the
constraints of ION can be frustrating, I think you can do what you need
to. You may just not want to!

Use the <ION_DATA_OUT> tag and write the .png file to a temp directory.
The temp directory will have to be writable by your web server's
process. There may be some security issues here (someone could hammer
your ION server and fill up the tmp area) but I am not a specialist in
these matters. Generate a name for the file in IDL using random
numbers. I have done it like so:

filename='images/tmp/ion'+string(fix(10000.*randomu(s)),form at='(I5.5)')+'.png'

write the png.

Then use some print statements to insert some html code to link to this
image.

Lastly, issue a command to at to clean up your image:

spawn, 'echo "rm -f /www/'+filename+'" | at now + 3 minutes'


this is certainly not as clean as one would like but it works well. We
have asked the ION engineers to add the ability to send VRML files
directly (via ion.i) instead of using this approach and they were quite
interested in the idea. I would pass along your suggestion of adding a
keyword to the <ION_IMAGE> tag that would allow for at least transparent
png's. My take on it is that they have this product that it quite
immature and they are eager to hear about peoples experiences.


-Rick Towler



Kenneth Mankoff wrote:
>
> On 10 Aug 2000, Craig Markwardt wrote:
>> davidf@dfanning.com (David Fanning) writes:
>>
>>> Craig Markwardt (craigmnet@cow.physics.wisc.edu) writes:
>>>
>>>> David, I think he's talking specifically about GIF transparent pixels.
>>>> I understand that you can reserve one GIF color to be transparent, so
>>>> to speak. Any pixels with that color are not rendered, so any
>>>> background graphics can show through. This can be especially useful
>>>> in web programming. I don't think he's actually trying to render it
>>>> on the screen himself.
>>>
>>> I'm not so sure. But I admit "I would like to make them transparent
>>> while the image is in memory." could be open to interpretation.
>>> I thought he wanted to see transparent pixels in IDL. Why else would
>>> he be saving and reading them back?
>>
>> I think he said he wanted to *avoid* writing and then reading back.
>> Other than that let's keep agreeing.
>>
>> Craig
>
> I'm using ION to make images for a website. ION is "IDL On [the] Net"
>
> For those of you who know html, its really as simple as this to generate
> images:
>
> <html>
> <ion_img>
> <idl>
> ;;; idl code goes here
> </idl>
> </ion_img>
> </html>
>
> and *wow*, you have a gif or jpeg _inside_ your web page that is generated
> based upon inputs supplied to the page by the user.
>
> But, yes, GIF's can have pixels that are transparent in that they show the
> background through them. WRITE_PNG has a transparent option, so i could
> write a PNG with transparent pixels, then re-read it the NEXT command
> (this stupid and slow), and then display that image to the page, and have
> my transparent (see-through) pixels.
>
> But i would prefer to do all that in memory, rather than using the
> webserver to needlessly read/write to PNG image.
>
> -ken.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: structures? pointers? Containers! (was: top10)
Next Topic: Re: Beginning GUI Applications

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

Current Time: Thu Oct 09 20:23:10 PDT 2025

Total time taken to generate the page: 1.35924 seconds