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

Home » Public Forums » archive » Re: Transparent PNG file in PowerPoint
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: Transparent PNG file in PowerPoint [message #35325] Wed, 11 June 2003 09:22
Stein Vidar Hagfors H[2] is currently offline  Stein Vidar Hagfors H[2]
Messages: 28
Registered: October 2002
Junior Member
"Rick Towler" <rtowler@u.washington.edu> writes:

> <David W. Fanning>; "Ph.D." wrote in message
>
>> The TRANSPARENT keyword in WRITE_PNG should be a 256-element
>> vector. The vector would represent possible values in your
>> 2D image. Any value that you wanted to be transparent would
>> have a value of 0 in the vector, while any value that you
>> wanted totally opaque would have the value of 255. You
>> could select the "degree" of transparency by varying the
>> values between 0 and 255 in the transparency vector.
>
> Of course! It says it right there in the documentation plain as day:
>
> "Set this keyword to an array of pixel index values which are to be treated
> as "transparent" for the purposes of image display. This keyword is valid
> only if Image is a single-channel (color indexed) image and the R, G, B
> palette is provided. "
>
> I don't know how I missed that.
>
> ;)

I hope that emoticon means what I think it means!

IMO, not only is the documentation plain wrong, the whole thing has been
botched from the start by naming the keyword TRANSPARENT! How difficult would
it have been to explain that you're using an indexed color model with arrays
R, G, B, and OPACITY having their self-evident meanings! Sigh.

--
------------------------------------------------------------ --------------
Stein Vidar Hagfors Haugan
ESA SOHO SOC/European Space Agency Science Operations Coordinator for SOHO

NASA Goddard Space Flight Center, Tel.: 1-301-286-9028
Mail Code 682.3, Bld. 26, Room G-1, Cell: 1-240-354-6066
Greenbelt, Maryland 20771, USA. Fax: 1-301-286-0264
------------------------------------------------------------ --------------
Re: Transparent PNG file in PowerPoint [message #35336 is a reply to message #35325] Tue, 10 June 2003 11:08 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
<David W. Fanning>; "Ph.D." wrote in message

> The TRANSPARENT keyword in WRITE_PNG should be a 256-element
> vector. The vector would represent possible values in your
> 2D image. Any value that you wanted to be transparent would
> have a value of 0 in the vector, while any value that you
> wanted totally opaque would have the value of 255. You
> could select the "degree" of transparency by varying the
> values between 0 and 255 in the transparency vector.

Of course! It says it right there in the documentation plain as day:

"Set this keyword to an array of pixel index values which are to be treated
as "transparent" for the purposes of image display. This keyword is valid
only if Image is a single-channel (color indexed) image and the R, G, B
palette is provided. "

I don't know how I missed that.

;)

-Rick

At least we know there still are compelling reasons to buy your book.
Re: Transparent PNG file in PowerPoint [message #35337 is a reply to message #35336] Tue, 10 June 2003 10:37 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Whoops!

> t[[!D.Table_Size-3,!D.Table_Size-4]] = 128

This should be:

t[[!D.Table_Size-3,!D.Table_Size-4]] = 255

The earlier version came from an experiment I was doing.
Sorry. :-(

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438
E-Mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Efficient calculation of triangle surface areas
Next Topic: Re: Zooming Object Graphics

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

Current Time: Fri Oct 10 18:33:33 PDT 2025

Total time taken to generate the page: 0.23893 seconds