image-js / tiff

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

fix: Support array sample format #51

Closed chubei-urus closed 7 months ago

chubei-urus commented 7 months ago

A floating point image that was saved from PhotoShop sets "SampleFormat" to [3, 3, 3].

chubei-urus commented 7 months ago

Hi @targos, I'm wondering if you'd accept this fix? And if so, what else needs to be done, in terms of test, documentation, etc.?

targos commented 7 months ago

Thanks for the contribution. Please add an example file (small if possible) to the img folder, and add a test case at the end of this array: https://github.com/image-js/tiff/blob/main/src/__tests__/decode.test.ts#L19

chubei-urus commented 7 months ago

I added a 2x2 image, but it's still 19KB.