image-js / tiff

TIFF image decoder written entirely in JavaScript
MIT License
190 stars 17 forks source link

Decoding of TIFF files slow and blocking the main thread #41

Open jonaskohl opened 2 years ago

jonaskohl commented 2 years ago

When I try to decode a 32 page TIFF file (either LZW compressed or uncompressed), I get very poor performance. The decoding takes over a minute and in that time, it blocks the main thread freezing the whole page.

Here is a link to the compressed file. I didn't want to upload the uncompressed file as it's about 1 GB in size. The uncompressed file can be obtained using:

magick convert <compressed file> -compress none uncompressed.tiff