CIS file format
CIS stands for Contact Image Sensor. CIS files are 1-bit image files using run-length encoding for data compression.
Structure of CIS files
| Byte offset | Byte size | Data type | Field | Description |
|---|---|---|---|---|
| 0 | 40 | char | description | ASCII characters describing roll. Unused trailing bytes filled with spaces (0x20). Nul (0x00) might be used to terminate string. |
| 40 | 2 | LE ushort | scanner width | Number of bytes in one scan line. |
| 42 | 2 | reserved | Unused field. | |
| 44 | 2 | LE ushort | tempo | Tempo of the roll (beats per minute format). Default value is 90 if value is 0. |
| 46 | 2 | LE ushort | LPI | Lines per inch along the vertical axis (length of roll). The default for this value is 182. |
| 48 | 4 | LE ulong | line count | Number of scan lines in the file. |
| 52 | data | Compressed version of the scanned data |
Structure of CIS files data segment
References
- CIS File Format (Preliminary) by Pete Knobloch, 24 Oct. 2015.