I've got some png icons with lots of transparent pixels, which I want to add to tray. I used NotifyIcon, and I had to convert my .pngs to .ico format.
Here you can see two icons with numbers. Left one is added with C# as a .ico, right one -- with Java as a .png. C# icon looks very blurry.
I also tried to load png, convert it to bitmap and then to icon. But this way I've lost all the transparency.
Bitmap b=(Bitmap)Image.FromFile("res\\b" + percentageCurrent + ".png");
IntPtr pIcon=b.GetHicon();
Icon ico=Icon.FromHandle(pIcon);
Is there a way to use png directly, like in Java, or at least make not-blurred icon from it?
UPD: Checked my ico files -- they seem to be fine and look exactly like pngs. So I assume icons are getting blurred while added to tray.