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

Home » Public Forums » archive » Re: PNGs with alpha channel?
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
Re: PNGs with alpha channel? [message #33822] Mon, 03 February 2003 16:01 Go to next message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Paul Woodford" wrote in message
> David Fanning wrote:
>
>> What do you mean by "do not see" it? It doesn't have a fourth
>> dimension, or you can't get the alpha channel to do anything?
>
> It doesn't have a fourth dimension.

It may not. Depending on how the image was created you may have to create
the 4,n,m image yourself using the data from the TRANSPARENT keyword . The
PNG spec allows for full alpha support and a sort of 1-bit support where
specific pixels are considered transparent.

FWIW, I read 4 channel .png files regularly going back to at least 5.3 with
a simple:

image = READ_PNG('myimage.png')


-Rick
Re: PNGs with alpha channel? [message #33829 is a reply to message #33822] Sun, 02 February 2003 12:49 Go to previous messageGo to next message
Paul Woodford is currently offline  Paul Woodford
Messages: 43
Registered: June 2000
Member
In article <MPG.18a519b4b9809640989abe@news.frii.com>,
David Fanning <david@dfanning.com> wrote:

> What do you mean by "do not see" it? It doesn't have a fourth
> dimension, or you can't get the alpha channel to do anything?

It doesn't have a fourth dimension.

> What are you trying to do with the alpha channel?

Overlay images with transparency; some of the images are generated
within IDL, and some elsewhere.

Might be time to check out 5.6...

Paul
Re: PNGs with alpha channel? [message #33832 is a reply to message #33829] Fri, 31 January 2003 22:40 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paul Woodford (cpwoodford@spamcop.net) writes:

> Can IDL read and/or write PNGs with an alpha channel?

It would appear so in IDL 5.6, at least.

> I've tried
> reading a PNG that I believe has an alpha channel using IDL 5.4, but I
> do not see the alpha channel.

What do you mean by "do not see" it? It doesn't
have a fourth dimension, or you can't get the alpha
channel to do anything? What are you trying to do
with the alpha channel?

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
Re: PNGs with alpha channel? [message #33884 is a reply to message #33822] Tue, 04 February 2003 20:35 Go to previous message
Paul Woodford is currently offline  Paul Woodford
Messages: 43
Registered: June 2000
Member
In article <b1n03l$33es$1@nntp6.u.washington.edu>,
"Rick Towler" <rtowler@u.washington.edu> wrote:

> Depending on how the image was created you may have to create
> the 4,n,m image yourself using the data from the TRANSPARENT keyword.

Aha! That does it, at least for color images. It doesn't seem to work
for grayscale images.

Paul
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Test if variable is a string
Next Topic: CALL_EXTERNAL

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

Current Time: Wed Oct 08 14:52:53 PDT 2025

Total time taken to generate the page: 0.00417 seconds