Closed msaad1311 closed 3 years ago
@msaad1311 Thanks for using this library. This library reduces the image width, height, or quality iteratively to meet the maxSizeMB and maxWidthOrHeight requirements. We make use of the Canvas API to do image processing. https://github.com/Donaldcwl/browser-image-compression/blob/7d633972e66f94d469789c806f5302397994b63a/lib/image-compression.js#L88-L107
Multi-thread non-blocking compression is supported through options that make use of Web Worker to handle Canvas processing outside the main thread. So the UI will not be "hang" when compressing the image.
Hi. First off, hats off to the amazing work. It is a real life saver. Nevertheless, I am curious to know the underlying working of the algorithm. In order words, I am curious to know how the compression of the images take place?
Looking forward to hearing from you soon. Thanks.