PNG with alpha blending support

D

Daan

We have created a PNG file that makes use of alpha blending. Now when we
display this file in our app (using a OpenNETCF PictureBoxEx control),
only the 100% transparent part of the picture shows up as 'transparent',
the rest is just solid color, no alpha blending is rendered.

Is there another control or other way that allows for PNGs (or perhaps
other image formats?) to make use of alpha blending?

Thanks for any pointers,
 
D

Daan

Alex said:
Alpha blending is not supported on the Platform level (Windows CE). The best
you can do is to identify the transparent color and draw the image on a top
of other color or image using one of the overrides of Graphice.DrawImage.

Take a look at this old post of mine:

http://blog.opennetcf.org/ayakhnin/PermaLink.aspx?guid=b1d16e2e-97ee-4fd1-9e3c-4378c86751fb

Thanks for the quick reply. The reason I asked is that we have a round
picture with anti-aliased border, and we want it to look good no matter
what the background color is.

We see a few alternatives, since no alpha blending is not possible:

1. Make separate pictures without transparancy. This means that we need
a separate picture file for each different background color, even if the
picture itself is actually the same. There is also the risk that the
background color of the picture is slightly different from the
background color.

2. Make a picture with transparancy, but no anti-aliasing. This picture
can then be used independent of the background color, but it results in
a more ugly picture, with jagged edges.

Do you see other alternatives, and recommend one?
Thanks,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top