browser-image-compression icon indicating copy to clipboard operation
browser-image-compression copied to clipboard

Image reference error in Webworker

Open Jungho-Cheon opened this issue 1 year ago • 1 comments

When I compress a particular image into a webworker, it seems that the loadImage function that calls while it compresses does not reference the image. Could it be related to using different images for each test but not being able to refer to the image?

스크린샷 2023-05-18 오전 11 38 51

Jungho-Cheon avatar May 18 '23 02:05 Jungho-Cheon

I think I know why. If the image is corrupted, an error occurs in the createImageBitmap(). This makes to excute loadImage() seems to refer to the Image.

If I compress a corrupted image from a Chrome browser, sometimes it prints a white image from canvas, is there a way to notice this as an error?

Jungho-Cheon avatar May 18 '23 03:05 Jungho-Cheon