Roughsketch / imagesize

Quickly probe the size of various image formats without reading the entire file.
MIT License
57 stars 12 forks source link

Support TIFF width and height in u16 #19

Closed gyk closed 1 year ago

gyk commented 1 year ago

If the width and height IFD entries of a TIFF file are big-endian 16-bit integers, the current implementation will return wrong results. Examples: 1, 2, 3.

This PR tries to fix this problem, using image-tiff's ifd mod as a reference.