I need to efficiently convert a JPG image to a PNG image with index transparency. Do you know if this is possible (or have code) to do this?
Notes: Index-transparency is used to make only one colour transparent (typically white) while alpha-transparency is used to make all colours in the image transparent.
Answer - Continued
Thanks for help. Here is the code I just tested.
Bitmap b = new Bitmap(Image.FromFile("c:\\input2.jpg"));
b.MakeTransparent(Color.White);
b.Save("c:\\output2.png", ImageFormat.Png);
It converts fine, but there are various hues of white and if you are considering making white borders around your image transparent, you will need to make all these hues of white transparent too.
cheers.