7#ifndef NBGL_IMAGE_UTILS_H
8#define NBGL_IMAGE_UTILS_H
32#define HEIGHT_OFFSET 2
37#define BPP_COMPRESS_OFFSET 4
43#define BUFFER_LEN_OFFSET 5
49#define BUFFER_OFFSET 8
54#define IMAGE_FILE_HEADER_SIZE 8
64#define GET_IMAGE_FILE_WIDTH(image_file) \
65 (image_file[WIDTH_OFFSET] | (image_file[WIDTH_OFFSET + 1] << 8))
71#define GET_IMAGE_FILE_HEIGHT(image_file) \
72 (image_file[HEIGHT_OFFSET] | (image_file[HEIGHT_OFFSET + 1] << 8))
78#define GET_IMAGE_FILE_BPP(image_file) (image_file[BPP_COMPRESS_OFFSET] >> 4)
84#define GET_IMAGE_FILE_COMPRESSION(image_file) (image_file[BPP_COMPRESS_OFFSET] & 0xF)
90#define GET_IMAGE_FILE_BUFFER_LEN(image_file) \
91 (image_file[BUFFER_LEN_OFFSET] | (image_file[BUFFER_LEN_OFFSET + 1] << 8) \
92 | (image_file[BUFFER_LEN_OFFSET + 2] << 16))
98#define GET_IMAGE_FILE_BUFFER(image_file) (&image_file[BUFFER_OFFSET])
Included by every low-level NBGL header, to forbid them in apollo app code.
common types for Graphical Library