Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Transparency no more transparent if opacity is less than 1

I have a 32-bit PNG representing a blue square in the middle of a transparent square. Below, I displayed this blue square with 3 different opacity values:

From left to right, opacity is 1, 0.5 and 0.1

From left to right, opacity is 1, 0.5 and 0.1 and as you can see (if you can't, just trust your Photoshop eyedropper) the area around the blue square is only transparent on the left image.

Here is the same image with the color values:

Same image with color values

I know it's barely visible but I'd like to know what causes this. Plus with some images and backgrounds, the contrast is more noticeable.

Thanks!

EDIT: Here's my VS solution for those who want to try it at home: http://www.mediafire.com/?gt704e62d53z7ae

like image 740
Rodolphe Avatar asked Feb 14 '12 09:02

Rodolphe


1 Answers

It is not anti-aliasing, and most likely not a Premultiplied Alpha Blending as its purpose is to do what you're doing.

It seems most like a rendering issue.

Have you tried this in several browsers? On a different machine with different GPU? On the same machine with updated drivers?

like image 55
one.beat.consumer Avatar answered Oct 30 '22 19:10

one.beat.consumer