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

Home » Public Forums » archive » Creating Transparent PNG Images
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Creating Transparent PNG Images [message #68451] Fri, 23 October 2009 11:53
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

I have a question about transparent PNG images. If you
go somewhere on the Internet and look for a transparent
PNG image, you will typically download an image that
has a "4" in one of its dimensions. One could think
of this as a "typical" 24-bit or true-color image with
an extra alpha channel. In IDL you have to go to some
effort to display such an image correctly:

http://www.dfanning.com/ip_tips/transparentpng.html

Now, for reasons that are obscure and don't have much
to do with IDL, I need to create such a PNG image from
within a piece of IDL code. Unfortunately, it doesn't
look like WRITE_PNG is up to the job.

I can easily create a 24-bit true-color image. But this
doesn't allow me to use the TRANSPARENT keyword. The only
way to make a transparent PNG is to have an 8-bit byte
image and RGB color vectors.

Am I missing something here in the documentation? Or, if
not, does anyone have a favorite method for creating
a true-color PNG file with an alpha channel? (I am
afraid this is a firm requirement for downstream
software to work correctly.)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Previous Topic: Problem to read some data.
Next Topic: Using where() on slices of data cubes

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

Current Time: Sat Oct 11 07:29:50 PDT 2025

Total time taken to generate the page: 0.87868 seconds