imread (repost)
Bill Denney
bill at denney.ws
Tue Aug 5 06:18:27 CDT 2008
soren at hauberg.org wrote:
> Quoting Daniel J Sebald <daniel.sebald at ieee.org>:
>> soren at hauberg.org wrote:
>>> Quoting Daniel J Sebald <daniel.sebald at ieee.org>:
>>>> 100% transparent would be not visible, I guess. The applications
>>>> would be special effects or masking off a rectangular image to
>>>> make it appear of a different shape.
>>>
>>> But what does 'not visible' mean? Should we just show the
>>> background color of the figure?
>>
>> Yes, whatever is behind the image (up to the point of plotting the
>> image) gets blended with the image. Wherever the image is 100%
>> transparent the contents behind it is completely visible, i.e.,
>> unaltered.
>
> Currently (and also in matlab I believe) you can only view one image
> at a time. So my question is basically, what is behind image? Say I
> run the following
>
> im = rand (100, 100, 4);
> im (:, :, 4) = 1; # full transparancy
> figure
> imshow (im)
>
> What should I expect to see?
I would expect to see the axis background color. If the axis background
color is set to none, then I would expect to see the figure background
color. I believe that if you set the figure background color to none in
matlab, you see a cross-hatched pattern. When exporting, I would
anticipate that the graphics backend would take alpha into account
relative to the output device, so if the output was to ps or pdf, it
would convert the background color to the color as visible on the screen.
I'm not saying that this is easy, just that-- to me-- the above is the
right way to do it.
Have a good day,
Bill
More information about the Octave-maintainers
mailing list