7 #ifndef NBGL_IMAGE_UTILS_H
8 #define NBGL_IMAGE_UTILS_H
25 #define WIDTH_OFFSET 0
30 #define HEIGHT_OFFSET 2
35 #define BPP_COMPRESS_OFFSET 4
41 #define BUFFER_LEN_OFFSET 5
47 #define BUFFER_OFFSET 8
52 #define IMAGE_FILE_HEADER_SIZE 8
62 #define GET_IMAGE_FILE_WIDTH(image_file) \
63 (image_file[WIDTH_OFFSET] | (image_file[WIDTH_OFFSET + 1] << 8))
69 #define GET_IMAGE_FILE_HEIGHT(image_file) \
70 (image_file[HEIGHT_OFFSET] | (image_file[HEIGHT_OFFSET + 1] << 8))
76 #define GET_IMAGE_FILE_BPP(image_file) (image_file[BPP_COMPRESS_OFFSET] >> 4)
82 #define GET_IMAGE_FILE_COMPRESSION(image_file) (image_file[BPP_COMPRESS_OFFSET] & 0xF)
88 #define GET_IMAGE_FILE_BUFFER_LEN(image_file) \
89 (image_file[BUFFER_LEN_OFFSET] | (image_file[BUFFER_LEN_OFFSET + 1] << 8) \
90 | (image_file[BUFFER_LEN_OFFSET + 2] << 16))
96 #define GET_IMAGE_FILE_BUFFER(image_file) (&image_file[BUFFER_OFFSET])
common types for Graphical Library