photopea / UTIF.js

Fast and advanced TIFF decoder
MIT License
424 stars 87 forks source link

TypeError: Cannot read properties of undefined (reading 'inflateRaw') #117

Closed lutifyme closed 1 year ago

lutifyme commented 1 year ago

Hello,

We have a three.js based app using utif.js to read tiff files. We're using the official tiff loader from three.js.

Most tiff files work just fine but some files throw the following error: "TypeError: Cannot read properties of undefined (reading 'inflateRaw')"

You can see more details here: https://www.dropbox.com/s/bnmk4w17qesv36d/image.png?dl=0

Please let me know if you need me to send the file privately.

Thanks!

Goran

photopea commented 1 year ago

Hi Goran, currently, UTIF.js also requires a library "pako.js" to decompress files using the DEFLATE / ZLIB compression.

We can also attach our own DEFLATE decompresssor to UTIF.js, but it would make it about 4 kB larger.

lutifyme commented 1 year ago

Can you? That would be very nice :-) I think 4kB is small enough.

photopea commented 1 year ago

I have uploaded the new version, which removes the pako.js dependency. I noticed it is also faster than pako a bit :)

lutifyme commented 1 year ago

Thanks a lot!