12#ifndef CORE_GP_CONVERT_H
13#define CORE_GP_CONVERT_H
33 gp_pixel p = GP_PIXEL_CREATE_RGB888(r, g, b);
51 gp_pixel p = GP_PIXEL_CREATE_RGBA8888(r, g, b, a);
59static inline gp_pixel gp_rgb_to_pixmap_pixel(uint8_t r, uint8_t g, uint8_t b,
69static inline gp_pixel gp_rgba_to_pixmap_pixel(uint8_t r, uint8_t g,
uint32_t gp_pixel
Pixel integer value.
Macros and functions for conversions between pixel types.
gp_pixel gp_pixel_to_RGBA8888(gp_pixel pixel, gp_pixel_type type)
Converts to RGBA8888 from any other pixel type.
gp_pixel gp_RGB888_to_pixel(gp_pixel pixel, gp_pixel_type type)
Convert RGB888 to any other pixel type.
gp_pixel gp_RGBA8888_to_pixel(gp_pixel pixel, gp_pixel_type type)
Convert RGBA8888 to any other pixel type.
static gp_pixel gp_rgb_to_pixel(uint8_t r, uint8_t g, uint8_t b, gp_pixel_type type)
Converts a color specified by its R, G, B components to a specified type.
static gp_pixel gp_rgba_to_pixel(uint8_t r, uint8_t g, uint8_t b, uint8_t a, gp_pixel_type type)
Converts a color specified by its R, G, B, A components to a specified type.
Fast value scaling macros.
gp_pixel_type
List of all pixel types.
enum gp_pixel_type pixel_type
A pixel format.