octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: imread (repost)


From: Bill Denney
Subject: Re: imread (repost)
Date: Tue, 05 Aug 2008 07:18:27 -0400
User-agent: Thunderbird 2.0.0.16 (Windows/20080708)

address@hidden wrote:
Quoting Daniel J Sebald <address@hidden>:
address@hidden wrote:
Quoting Daniel J Sebald <address@hidden>:
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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]