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

Home » Public Forums » archive » Re: overlaying a transparent 24-bit image with different pixel scale
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: overlaying a transparent 24-bit image with different pixel scale [message #73224] Fri, 29 October 2010 13:35
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jeremy Bailin writes:

> Yup, I've got it working. Now, if only it showed the result I'd
> hoped! ;-)

Yes. Always a problem. :-)

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.")
Re: overlaying a transparent 24-bit image with different pixel scale [message #73225 is a reply to message #73224] Fri, 29 October 2010 13:13 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Oct 29, 3:24 pm, David Fanning <n...@dfanning.com> wrote:
> Jeremy Bailin writes:
>> Yes, that would work for me! I think having the option of reading it
>> straight from the display, when available, would also be great.
>
> Humm. This is a little more complicated than I expected it to
> be. The code is not structured with this in mind, and I am
> reluctant to undergo big structural changes to such an
> important program. It might be possible, but I want to move
> slowly.
>
> I should think, though, that you might be able to work
> some kind of solution out with BlendImage.
>
> 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.")

Yup, I've got it working. Now, if only it showed the result I'd
hoped! ;-)

-Jeremy.
Re: overlaying a transparent 24-bit image with different pixel scale [message #73226 is a reply to message #73225] Fri, 29 October 2010 12:24 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jeremy Bailin writes:

> Yes, that would work for me! I think having the option of reading it
> straight from the display, when available, would also be great.

Humm. This is a little more complicated than I expected it to
be. The code is not structured with this in mind, and I am
reluctant to undergo big structural changes to such an
important program. It might be possible, but I want to move
slowly.

I should think, though, that you might be able to work
some kind of solution out with BlendImage.

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.")
Re: overlaying a transparent 24-bit image with different pixel scale [message #73228 is a reply to message #73226] Fri, 29 October 2010 11:47 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Oct 29, 2:41 pm, David Fanning <n...@dfanning.com> wrote:
> David Fanning writes:
>> My only
>> concern is that if I take what's in the display window
>> as the background for the alpha channel, this will NOT
>> make it possible to display the image in PostScript.
>> (No window to read from.) Is this a limitation you
>> can live with?
>
> Maybe I would have to make you supply a "background"
> image, from which I could take the information I
> need to do the alpha blending. This would work, I think,
> on all devices.
>
> 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.")

Yes, that would work for me! I think having the option of reading it
straight from the display, when available, would also be great.

-Jeremy.
Re: overlaying a transparent 24-bit image with different pixel scale [message #73229 is a reply to message #73228] Fri, 29 October 2010 11:44 Go to previous message
Jeremy Bailin is currently offline  Jeremy Bailin
Messages: 618
Registered: April 2008
Senior Member
On Oct 29, 2:36 pm, David Fanning <n...@dfanning.com> wrote:
> Jeremy Bailin writes:
>> I can calculate the appropriate normalized coordinates corresponding
>> to the corners of where the image should be placed. I've tried feeding
>> that and the 24-bit image into TVIMAGE, but it uses a white background
>> for the alpha channel, not what already exists on the display. And
>> David's example for overlaying things (http://www.dfanning.com/ip_tips/
>> transparentpng.html) assumes a relative pixel scale of 1.
>
> Well, a new keyword will probably fix that up! :-)
>
> I was going to make a change to TVImage today anyway,
> so I might as well do this at the same time. My only
> concern is that if I take what's in the display window
> as the background for the alpha channel, this will NOT
> make it possible to display the image in PostScript.
> (No window to read from.) Is this a limitation you
> can live with?
>
> 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.")

Unfortunately, that's kind of essential. :-( So I think rolling my
own is going to be necessary anyway... though it would certainly be a
good thing to have in TVIMAGE, even I can't use it today!

Since the background is something that I generate myself, I can fake
the output of TVRD by putting the 8-bit image through the colour
table. I should be okay as long as I can keep track of all the
different coordinates in several different coordinate systems on a
Friday afternoon. ;-)

-Jeremy.
Re: overlaying a transparent 24-bit image with different pixel scale [message #73230 is a reply to message #73229] Fri, 29 October 2010 11:41 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> My only
> concern is that if I take what's in the display window
> as the background for the alpha channel, this will NOT
> make it possible to display the image in PostScript.
> (No window to read from.) Is this a limitation you
> can live with?

Maybe I would have to make you supply a "background"
image, from which I could take the information I
need to do the alpha blending. This would work, I think,
on all devices.

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.")
Re: overlaying a transparent 24-bit image with different pixel scale [message #73231 is a reply to message #73230] Fri, 29 October 2010 11:36 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jeremy Bailin writes:

> I can calculate the appropriate normalized coordinates corresponding
> to the corners of where the image should be placed. I've tried feeding
> that and the 24-bit image into TVIMAGE, but it uses a white background
> for the alpha channel, not what already exists on the display. And
> David's example for overlaying things (http://www.dfanning.com/ip_tips/
> transparentpng.html) assumes a relative pixel scale of 1.

Well, a new keyword will probably fix that up! :-)

I was going to make a change to TVImage today anyway,
so I might as well do this at the same time. My only
concern is that if I take what's in the display window
as the background for the alpha channel, this will NOT
make it possible to display the image in PostScript.
(No window to read from.) Is this a limitation you
can live with?

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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Orbit Calculation
Next Topic: Separated at Birth?

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

Current Time: Wed Oct 08 17:12:18 PDT 2025

Total time taken to generate the page: 0.00711 seconds