render-fx: add image formats in public API

This commit is contained in:
Lephe 2024-01-31 15:51:39 +01:00
parent 833025f5dd
commit caa68b08bf
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 13 additions and 6 deletions

View File

@ -61,12 +61,6 @@ typedef enum
} color_t;
/* Profiles:
0: MONO (1 layer: color)
1: ALPHA (2 layers: color, alpha)
2: GRAY (2 layers: light, dark)
3: GRAY_ALPHA (3 layers: light, dark, alpha) */
//---
// Image rendering (bopti)
//---
@ -93,6 +87,19 @@ typedef struct
} GPACKED(4) bopti_image_t;
/* Image formats ("profiles") */
enum {
/* MONO: black/white, 1 layer (bw) */
IMAGE_MONO = 0,
/* MONO_ALPHA: black/white/transparent, 2 layers (alpha+bw) */
IMAGE_MONO_ALPHA = 1,
/* GRAY: black/dark/light/white, 2 layers (light+dark) */
IMAGE_GRAY = 2,
/* GRAY_ALPHA: black/dark/light/white/transparent, 3 layres
(alpha+light+dark) */
IMAGE_GRAY_ALPHA = 3,
};
/* Number of layers in the image. */
GINLINE static int image_layer_count(int profile)
{