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

Home » Public Forums » archive » Re: transparent background
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 background [message #35283] Wed, 04 June 2003 17:40 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Rick Towler (rtowler@u.washington.edu) writes:

> FWIW, I can create an image with a transparent background with one step and
> a PC :)

Well, how was that done? Because I didn't have any luck
at all fooling around with it the other day for 15-20 minutes.

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: transparent background [message #35284 is a reply to message #35283] Wed, 04 June 2003 17:13 Go to previous messageGo to next message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Graham" wrote in message...

> If you are trying to make an image with a transparent background, you
> will likely need a two step process or a mac with office for os x :)

FWIW, I can create an image with a transparent background with one step and
a PC :)

-r
Re: transparent background [message #35285 is a reply to message #35284] Wed, 04 June 2003 16:43 Go to previous messageGo to next message
GrahamWilsonCA is currently offline  GrahamWilsonCA
Messages: 12
Registered: January 2003
Junior Member
You may want to try using the 'CGM' driver in your set_plot command.
This is a metafile format that will produce a vector file format if
possible. Moreover, powerpoint will import these as ANSI version 3
with no troubles.

If you are trying to make an image with a transparent background, you
will likely need a two step process or a mac with office for os x :)

GW
Re: transparent background [message #35294 is a reply to message #35285] Tue, 03 June 2003 10:20 Go to previous messageGo to next message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Craig Niederberger" wrote in message...

> I'm trying to import a plot into PowerPoint, but I'd like the
> background to be transparent. I've been fooling around with the
> metafile display device, e.g.
>
> SET_PLOT, 'METAFILE'
>
> but so far have been unable to achieve a transparent background. Any
> ideas?

I don't know how PP will handle it but I would try writing a PNG file and
setting the TRANSPARENT keyword appropriately. Check the docs.

Some applications may ignore the transparent pixels in PNG files but I don't
know if PP is one of them. If it doesn't work, you could try using
Photoshop or a similar program to convert the PNG to a GIF with transparency
and drop that in PP.

-Rick
Re: transparent background [message #35295 is a reply to message #35294] Tue, 03 June 2003 10:25 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Craig Niederberger wrote:
> Hi all,
>
> I'm trying to import a plot into PowerPoint, but I'd like the
> background to be transparent. I've been fooling around with the
> metafile display device, e.g.
>
> SET_PLOT, 'METAFILE'
>
> but so far have been unable to achieve a transparent background. Any
> ideas?
>
> Many TIA,
> Craig

Three months are gone

Please have a look at the google archive and search for example

pstoimg group:comp.lang.idl-pvwave group:comp.lang.idl-pvwave
group:comp.lang.idl-pvwave


pstoimg has a transparent parameter.

from the help:

-transparent
Generate transparent bitmaps, i.e. the background
color (white) is transparent if viewed with certain
viewers (e.g. browsers). This option may not be avail-
able due to missing capabilities of external programs.



pstoimg - Convert a PostScript file to a bitmap image
using Ghostscript and the Netpbm utilities


regards

Reimar


--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
Re: transparent background [message #35366 is a reply to message #35283] Thu, 05 June 2003 11:29 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"David Fanning" wrote in message ...
> Rick Towler writes:
>
>> FWIW, I can create an image with a transparent background with one step
and
>> a PC :)
>
> Well, how was that done? Because I didn't have any luck
> at all fooling around with it the other day for 15-20 minutes.

You didn't really fool around for 20 minutes, did you?


With the B/W linear color table loaded:

IDL> test = BYTARR(200,200)
IDL> test[100:199,*] = 200
IDL> tvlct, r,g,b,/get
IDL> write_png,'test.png',test,r,g,b,TRANSPARENT=[0]


In PP, Insert -> Picture -> From File... and select 'test.png'

I have a 200x200 image, right half is lt. gray, left half is transparent.

Load test.png up in Photoshop and the left half of the image is transparent
too.

-r
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: vfw for idl
Next Topic: vfw for idl

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

Current Time: Wed Oct 08 17:42:20 PDT 2025

Total time taken to generate the page: 0.00678 seconds