Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to eliminate "halo" in images with transparent backgrounds

I'm using DrawImage() to paint some images on a form with transparent background. Those images which are partly transparent cause a "halo" effect.(Look at the screenshot)

What's the best way to prevent that from happening

alt text http://www.imagechicken.com/uploads/1266798081003158300.png

EDIT

These same icons look great on my desktop so there should be some better way of painting the icons.

like image 922
CodeRush Avatar asked Dec 30 '25 00:12

CodeRush


1 Answers

It's probably being caused by double rendering - the icon is rendering onto your transparent form, then the form is rendering over the background. Anyplace where your icon is only partially transparent, the form is losing all of its transparency.

Perhaps there is a change you can make to the form to support partial transparency rather than binary.

like image 117
Mark Ransom Avatar answered Jan 01 '26 16:01

Mark Ransom