Set transparency background color when saving to jpeg?
gobijan opened this issue · comments
Hi nfnt,
thank you for creating this great library. Saves me from using another non-go dependency like imagemagick :)
I am resizing PNG images to JPEG. These images can include transparency. What is the best way to change the black background color in JPEG to for example white?
I know that JPEG doesn't support transparency and so it would be nice if one could just change the black to another color.
Best regards
Bijan
Hi Bijan,
part of the appeal of this library is, that's it's very simple and easy to use. It should provide a solution to common image scaling tasks. It is not meant to be the best solution for every imaginable use case -- that would make it much harder to use, as the API would have to support all of these use cases. Your suggested use case would result in a more complicated API to support the old as well as the new behavior. So, let's keep it simple, thus keep things as they are right now.
Sounds feasible.