Piotr Caban piotr.caban@gmail.com wrote:
Even internally gdiplus shouldn't do this kind of hacks IMO, if there is a need for a shortcut for a particular encoder class id it's better to add a helper. Have a look at the encoder/decoder tests how it's supposed to look like.
I've done it this way because I don't think we should go through enumerating all supported formats internally.
Why not?
How about using encode_image_png function directly?
I personally don't like it, this is not a performance critical code.
While looking at this I noticed that 'clsid' parameter in encode_image_func() is unused, that's probably a leftover from previous implementation.