C# – How to change PNG quality or color depth

Sorry for bringing up an old question, but I were solving the same problem today and found this page on MSDN: “Listing Parameters and Values for All Encoders”. I hope it might be useful to refer to it there.

The article contains a sample program which outputs EncoderParameters supported by stock GDI+ image encoders, and PNG encoder supports no parameters according to it.

I’m not sure thought if one can take this for granted, or in some future version of gdiplus.dll the PNG encoder might grow more support, and so one is supposed to check the encoder’s capabilities at runtime.

In any case applying some explicit transformation on a source image appears to be more fruitful approach; I did not explore it yet though.

Leave a Comment