Main Page | Report Page

 

  Computers Forum Index » Computer Languages (IDL-PVWAVE) » Displaying Transparent Images...

Author Message
David Fanning...
Posted: Fri Nov 05, 2010 7:44 pm
 
Folks,

Jeremy's suggestion the other day about displaying alpha channel
images with TVImage was a good one. It has taken me a week or so
to get all the bugs worked out (lots of code changes!), but I think
I am finally there. I've put up a new version this morning with
another bug fix and some code rearrangement to make the code
easier to maintain. (Amazing how much things can be improved
after you understand what you are doing!)

http://www.dfanning.com/programs/tvimage.pro

Testing this functionality gave me a lot of good ideas for
how it can be used. In fact, I found I *really* had a need
for displaying transparent images yesterday! A transparent
image is one in which a particular color has been knocked
out so you can see the background behind it.

To make this easy to do, I wrote a new program, named
Make_Transparent_Image, last night to create transparent
images either from other images I have laying around
or directly from graphics windows containing plots and
such that I wish to display on other, background images.
(I was fooling around making image mash-ups for book
cover designs.) You can find the program here:

http://www.dfanning.com/programs/make_transparent_image.pro

I have to admit, it's pretty neat. I'm displaying plots
and such with white backgrounds. If I want to create
an image with the white background knocked out, so I
can put the plot on another image, I just do something
like this:

IDL> Histoplot, LoadData(7)
IDL> transparent = Make_Transparent_Image(Color='white')
IDL> LoadCT, 22
IDL> TVImage, Loaddata(7)
IDL> TVImage, transparent, POSITION=[0.5, 0.5, 0.95, 0.95]

Totally cool! :-)

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.")
 
Jean...
Posted: Fri Nov 05, 2010 7:44 pm
 
On Nov 5, 2:41 pm, Jeremy Bailin <astroco... at (no spam) gmail.com> wrote:
Quote:
On Nov 5, 11:44 am, David Fanning <n... at (no spam) dfanning.com> wrote:



Folks,

Jeremy's suggestion the other day about displaying alpha channel
images with TVImage was a good one. It has taken me a week or so
to get all the bugs worked out (lots of code changes!), but I think
I am finally there. I've put up a new version this morning with
another bug fix and some code rearrangement to make the code
easier to maintain. (Amazing how much things can be improved
after you understand what you are doing!)

   http://www.dfanning.com/programs/tvimage.pro

Testing this functionality gave me a lot of good ideas for
how it can be used. In fact, I found I *really* had a need
for displaying transparent images yesterday! A transparent
image is one in which a particular color has been knocked
out so you can see the background behind it.

To make this easy to do, I wrote a new program, named
Make_Transparent_Image, last night to create transparent
images either from other images I have laying around
or directly from graphics windows containing plots and
such that I wish to display on other, background images.
(I was fooling around making image mash-ups for book
cover designs.) You can find the program here:

   http://www.dfanning.com/programs/make_transparent_image.pro

I have to admit, it's pretty neat. I'm displaying plots
and such with white backgrounds. If I want to create
an image with the white background knocked out, so I
can put the plot on another image, I just do something
like this:

   IDL> Histoplot, LoadData(7)
   IDL> transparent = Make_Transparent_Image(Color='white')
   IDL> LoadCT, 22
   IDL> TVImage, Loaddata(7)
   IDL> TVImage, transparent, POSITION=[0.5, 0.5, 0.95, 0.95]

Totally cool! :-)

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.")

Thanks again! Very useful stuff. Smile
-Jeremy.

David,

Are you gonna put this new program in your repository. I found this
coyote repository very convenient to use !

Jean
 
Jeremy Bailin...
Posted: Fri Nov 05, 2010 7:44 pm
 
On Nov 5, 11:44 am, David Fanning <n... at (no spam) dfanning.com> wrote:
Quote:
Folks,

Jeremy's suggestion the other day about displaying alpha channel
images with TVImage was a good one. It has taken me a week or so
to get all the bugs worked out (lots of code changes!), but I think
I am finally there. I've put up a new version this morning with
another bug fix and some code rearrangement to make the code
easier to maintain. (Amazing how much things can be improved
after you understand what you are doing!)

   http://www.dfanning.com/programs/tvimage.pro

Testing this functionality gave me a lot of good ideas for
how it can be used. In fact, I found I *really* had a need
for displaying transparent images yesterday! A transparent
image is one in which a particular color has been knocked
out so you can see the background behind it.

To make this easy to do, I wrote a new program, named
Make_Transparent_Image, last night to create transparent
images either from other images I have laying around
or directly from graphics windows containing plots and
such that I wish to display on other, background images.
(I was fooling around making image mash-ups for book
cover designs.) You can find the program here:

   http://www.dfanning.com/programs/make_transparent_image.pro

I have to admit, it's pretty neat. I'm displaying plots
and such with white backgrounds. If I want to create
an image with the white background knocked out, so I
can put the plot on another image, I just do something
like this:

   IDL> Histoplot, LoadData(7)
   IDL> transparent = Make_Transparent_Image(Color='white')
   IDL> LoadCT, 22
   IDL> TVImage, Loaddata(7)
   IDL> TVImage, transparent, POSITION=[0.5, 0.5, 0.95, 0.95]

Totally cool! :-)

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.")

Thanks again! Very useful stuff. Smile
-Jeremy.
 
 
Page 1 of 1    
All times are GMT
The time now is Tue Jul 22, 2014 1:29 pm