image-js / tiff

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

Unsupported lzw #15

Closed dy closed 4 years ago

dy commented 6 years ago

I am trying to decode this file test_pattern.zip

let {decode} = require('tiff')
decode(fs.readFileSync('./test_pattern.tiff'))

I get

Error: Unsupported lzw: undefined
at unsupported (C:\projects\image-decode\node_modules\tiff\lib\index.js:870:10)

Not sure this error is valid.

dy commented 6 years ago

With this file test_pattern.zip

I get

(node:10904) UnhandledPromiseRejectionWarning: Error: invalid compression: 8
    at TIFFDecoder.readStripData (C:\projects\image-decode\node_modules\tiff\lib\index.js:813:17)
dy commented 6 years ago

Also, that decodes this file: test_pattern.zip

Completely wrong: download

dy commented 6 years ago

Tests do not seem to cover data validity right now.

targos commented 6 years ago

Yeah, the readme mentions that we do not support compressed images yet. Thanks for the report and examples, though. I will not have time in the near future to work on it, but would be happy to review pull requests.

dy commented 6 years ago

Got you. Well, I moved to utif in image-decode and pretty happy with that. Possibly there is a sense to transition to image-decode in image.js, I could transfer this repo to the org. (by coincidence I run audiojs and state of affairs there is the same).

targos commented 4 years ago

LZW is now supported