SketchUp C API
|
A simple struct with four indices indicating the ordering of color data within 32-bit bitmap images. 32-bit bitmap images have 4 channels per pixel: red, green, blue, and alpha where the alpha channel indicates the transparency of the pixel. SketchUpAPI expects the channels to be in different orders on Windows vs. Mac OS. Bitmap data is exposed in BGRA and RGBA byte orders on Windows and Mac OS, respectively. The color order indices facilitate platform independent code when it is necessary to manipulate image pixel data. The struct's data also applies to 24-bit bitmap images except that such images don't have an alpha channel so the SUColorOrder::alpha_index varaible can be ignored. More...
#include <SketchUpAPI/model/image_rep.h>
Data Fields | |
short | red_index |
short | green_index |
short | blue_index |
short | alpha_index |
Related Functions | |
(Note that these are not member functions.) | |
struct SUColorOrder | SUGetColorOrder () |
Retrieves a SUColorOrder indicating the order of color bytes within 32-bit images' pixel data. More... | |
A simple struct with four indices indicating the ordering of color data within 32-bit bitmap images. 32-bit bitmap images have 4 channels per pixel: red, green, blue, and alpha where the alpha channel indicates the transparency of the pixel. SketchUpAPI expects the channels to be in different orders on Windows vs. Mac OS. Bitmap data is exposed in BGRA and RGBA byte orders on Windows and Mac OS, respectively. The color order indices facilitate platform independent code when it is necessary to manipulate image pixel data. The struct's data also applies to 24-bit bitmap images except that such images don't have an alpha channel so the SUColorOrder::alpha_index varaible can be ignored.
|
related |
Retrieves a SUColorOrder indicating the order of color bytes within 32-bit images' pixel data.
short SUColorOrder::alpha_index |
Indicates the position of the alpha byte within a
single pixel's data.
short SUColorOrder::blue_index |
Indicates the position of the blue byte within a
single pixel's data.
short SUColorOrder::green_index |
Indicates the position of the green byte within a
single pixel's data.
short SUColorOrder::red_index |
Indicates the position of the red byte within a single
pixel's data.