GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
Functions
gp_convert.gen.h File Reference

Macros and functions for conversions between pixel types. More...

#include <core/gp_get_set_bits.h>
#include <core/gp_pixmap.h>
#include <core/gp_pixel.h>

Go to the source code of this file.

Functions

gp_pixel gp_RGB888_to_pixel (gp_pixel pixel, gp_pixel_type type)
 Convert RGB888 to any other pixel type.
 
gp_pixel gp_pixel_to_RGB888 (gp_pixel pixel, gp_pixel_type type)
 Converts to RGB888 from any other pixel type.
 
gp_pixel gp_RGBA8888_to_pixel (gp_pixel pixel, gp_pixel_type type)
 Convert RGBA8888 to any other pixel type.
 
gp_pixel gp_pixel_to_RGBA8888 (gp_pixel pixel, gp_pixel_type type)
 Converts to RGBA8888 from any other pixel type.
 
gp_pixel gp_G8_to_pixel (gp_pixel pixel, gp_pixel_type type)
 Convert G8 to any other pixel type.
 
gp_pixel gp_pixel_to_G8 (gp_pixel pixel, gp_pixel_type type)
 Converts to G8 from any other pixel type.
 

Detailed Description

Macros and functions for conversions between pixel types.

Definition in file gp_convert.gen.h.

Function Documentation

◆ gp_G8_to_pixel()

gp_pixel gp_G8_to_pixel ( gp_pixel  pixel,
gp_pixel_type  type 
)

Convert G8 to any other pixel type.

Does not work on palette types at all (yet)

Parameters
pixelA pixel value.
typeA pixel type to convert the value to.
Returns
A converted pixel value.

◆ gp_pixel_to_G8()

gp_pixel gp_pixel_to_G8 ( gp_pixel  pixel,
gp_pixel_type  type 
)

Converts to G8 from any other pixel type.

Does not work on palette types at all (yet)

Parameters
pixelA pixel value.
typeA pixel type for the value.
Returns
A converted pixel value.

◆ gp_pixel_to_RGB888()

gp_pixel gp_pixel_to_RGB888 ( gp_pixel  pixel,
gp_pixel_type  type 
)

Converts to RGB888 from any other pixel type.

Does not work on palette types at all (yet)

Parameters
pixelA pixel value.
typeA pixel type for the value.
Returns
A converted pixel value.

◆ gp_pixel_to_RGBA8888()

gp_pixel gp_pixel_to_RGBA8888 ( gp_pixel  pixel,
gp_pixel_type  type 
)

Converts to RGBA8888 from any other pixel type.

Does not work on palette types at all (yet)

Parameters
pixelA pixel value.
typeA pixel type for the value.
Returns
A converted pixel value.

◆ gp_RGB888_to_pixel()

gp_pixel gp_RGB888_to_pixel ( gp_pixel  pixel,
gp_pixel_type  type 
)

Convert RGB888 to any other pixel type.

Does not work on palette types at all (yet)

Parameters
pixelA pixel value.
typeA pixel type to convert the value to.
Returns
A converted pixel value.

Referenced by gp_rgb_to_pixel().

◆ gp_RGBA8888_to_pixel()

gp_pixel gp_RGBA8888_to_pixel ( gp_pixel  pixel,
gp_pixel_type  type 
)

Convert RGBA8888 to any other pixel type.

Does not work on palette types at all (yet)

Parameters
pixelA pixel value.
typeA pixel type to convert the value to.
Returns
A converted pixel value.

Referenced by gp_rgba_to_pixel().