diff options
author | Akshay <[email protected]> | 2021-03-10 14:33:20 +0000 |
---|---|---|
committer | Akshay <[email protected]> | 2021-03-10 14:33:20 +0000 |
commit | 5fced94f8446f2c3875fa5973b3532403c9431a5 (patch) | |
tree | 412ac9dd58802921d406e13be803a09cbb93b450 /spec.md | |
parent | 3d25a69b686c68f463ba313b2da112df135f1f0c (diff) |
rename spec to readme
Diffstat (limited to 'spec.md')
-rw-r--r-- | spec.md | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/spec.md b/spec.md deleted file mode 100644 index 7f455e2..0000000 --- a/spec.md +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | # One Bit Image | ||
2 | |||
3 | The One Bit Image is a file format to store single bit depth | ||
4 | images, similar to 1-bit BMP files. It is a learning | ||
5 | adventure and does not aim to be ubiquitous or | ||
6 | well-performing. The name is shortened to `obi`, any files | ||
7 | that wish to be identified as this format may use the file | ||
8 | extension `.obi`, for example: `apple.obi`. | ||
9 | |||
10 | ## Technical Specification | ||
11 | |||
12 | The file format consists of the following sections: | ||
13 | |||
14 | - File Header: 10 bytes, 0x0000 - 0x00A0 | ||
15 | - Image Information Header: 16 bytes, 0x00A0 - 0x01A0 | ||
16 | - Pixel data: Variable, 0x1A0 - Variable | ||
17 | |||
18 | ### File Header (10 bytes) | ||
19 | |||
20 | This header contains the following metadata about the file | ||
21 | itself: | ||
22 | |||
23 | - OBI version (2 bytes, 0x0000) | ||
24 | - File size in bytes (4 bytes, 0x0020) | ||
25 | - Data offset: Offset from the beginning of the file to the | ||
26 | beginning of bitmap data (4 bytes, 0x0060) | ||
27 | |||
28 | ### Image Information Header (16 bytes) | ||
29 | |||
30 | This header contains metadata about the image: | ||
31 | |||
32 | - Width: Horizontal size of the bitmap data in pixels (4 | ||
33 | bytes, 0x00A0). | ||
34 | - Height: Vertical size of the bitmap data in pixels (4 | ||
35 | bytes, 0x00E0). | ||
36 | - Compression Algorithm: The following types of compression | ||
37 | are supported: RLE, Kosinki etc. Set 0 if no compression | ||
38 | (4 bytes, 0x0120). | ||
39 | - Image size after compression (set 0 if no compression, | ||
40 | i.e., Compression=0). (4 bytes, 0x0160) | ||
41 | |||
42 | ### Pixel Data (ImageInformationHeader.Width * ImageInformationHeader.Height bytes) | ||
43 | |||
44 | The image data. Each pixel is a single bit, the size of | ||
45 | Pixel Data is given by `Width * Height`. | ||