bergben / ng2-img-max

Angular 2 module to resize images down to a certain width and height or to reduce the quality to fit a certain maximal filesize - all in the browser.
MIT License
83 stars 46 forks source link

Suggestion for handling alpha channels #7

Open donjae opened 7 years ago

donjae commented 7 years ago

Would it be possible to add a feature to compress images with alpha channels and convert it to white?

Not sure how feasible it would be, so feel free to take this with a grain of salt. (Loving the package otherwise)

bergben commented 7 years ago

I gotta be honest I don't know how and if that would work. Compressing with .webp works though... So what could be done is optionally setting an option to compress the png as webp, the returned file would be .webp then instead of .png...

donjae commented 7 years ago

Word, I'll close this issue out. Thanks for taking a look at the request!

bergben commented 7 years ago

Let's leave it open, maybe someone that has a solution to this sees the issue that way and we can solve the alpha channels issue :)