GPHemsley / tiff-js

A JavaScript-based parser for the TIFF image format.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support sub-byte bitsPerSample

GPHemsley opened this issue · comments

The size of a sample is stored in bitsPerSample, which allows sub-byte values (i.e. values not divisible by 8). As a result, sample data could span byte boundaries.

Since many images use this method (it allows for smaller files), we need to support this. However, it will require fancy handling, because DataView only allows reading a minimum of one byte at a time.