Home »
Public Forums »
archive »
overlaying a transparent 24-bit image with different pixel scale
overlaying a transparent 24-bit image with different pixel scale [message #73232] |
Fri, 29 October 2010 10:53 |
Jeremy Bailin
Messages: 618 Registered: April 2008
|
Senior Member |
|
|
I'm sure this task is trivial with the right tools. But apparently I
am missing them.
I have an 8-bit image that I am generating in my code, which I display
using a colour table with TVIM, using it to draw axes and set the
data coordinates.
I then want to overplot a 24-bit image with an alpha channel,
centering it at a specific *data* coordinate, and using a known pixel
scale in data coordinates (which is quite different from 1).
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.
I'm sure I can figure out how to roll my own version of this myself,
but I'm also sure it would take a lot longer than finding a tool
someone's already written. :-)=
-Jeremy.
|
|
|
Current Time: Fri Oct 10 21:31:28 PDT 2025
Total time taken to generate the page: 0.88067 seconds