Roughsketch / imagesize

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

Handle HDR files orientations #26

Closed Roughsketch closed 1 year ago

Roughsketch commented 1 year ago

While trying to figure out a better way to support HDR without relying on read_line, I came across the HDR spec. In the Resolution String section (page 31) I found out that -Y does not just denote the start of a standard width/height resolution. Resolutions can either start with +/- X/Y, which means the original implementation only supports 2/8 valid HDR resolution strings.

Before release I plan on adding support for these orientations. Not sure where I can find HDR test files for this though.

Supported orientations based on ExifTool notation:

Roughsketch commented 1 year ago

I believe this is finished, but going to re-run fuzzer and then see if there's anything else to tidy up. Still no test files for these cases but I think these types of images are harder to come by in specific formats and I don't know how to make them myself.