aboutsummaryrefslogtreecommitdiffstats
path: root/src/cnki_jbig.h
blob: 2983607cadcea5fd808a3022d9990f121b72df1f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
/*
 * Copyright (c) 2020-2022, yzrh <yzrh@noema.org>
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <stdint.h>

typedef enum _dib_compression_code {
	BI_RGB,
	BI_RLE8,
	BI_RLE4,
	BI_BITFIELDS,
	BI_JPEG,
	BI_PNG,
	BI_ALPHABITFIELDS,
	BI_CMYK = 11,
	BI_CMYKRLE8 = 12,
	BI_CMYKRLE4 = 13
} dib_compression_code;

typedef struct _dib_t {
	uint32_t dib_size; /* Always 40 */
	int32_t width;
	int32_t height;
	uint16_t plane; /* Always 1 */
	uint16_t depth;
	uint32_t compression; /* dib_compression_code */
	uint32_t size;
	int32_t resolution_h;
	int32_t resolution_v;
	uint32_t colour;
	uint32_t colour_used;
} dib_t;

typedef struct _colour_table {
	uint16_t blue;
	uint16_t green;
	uint16_t red;
	uint16_t fill; /* Always 0 */
} colour_table;