2019.06.03. 16:55
Proposal: 1bit file format
I was recently working with user-editable texture masks, and I was a little surprized when I didn’t find a specialized image file format for 1-bit (monochrome) images. So, here’s a file format proposal:
- File extension: .1bit
- Magic header: 4 bytes: “1bit” in ASCII
- 2 bytes for the width of the image
- 2 bytes for the height of the image
- 1 byte for number of channels
- RLE-compressed binary data
- Optional:
- 1 byte for the length of the comment
- 1-254 bytes of text comment because ebin memes
Am I missing anything?
I wonder how hard would it be to create a Photoshop plugin for this. A C or C# implementation would be fairly trivial, though it can be a bit tricky when doing 1-bit RLE compression.