![]() |
Public API Reference |
![]() |
RGBA data packing. More...
#include <csgfx/packrgb.h>
Static Public Member Functions | |
static csRGBpixel * | CopyUnpackRGBAtoRGBpixel (const uint8 *rgba, size_t numPixels) |
Unpack a RGBA byte array into an array of csRGBpixel. | |
static void | csDiscardUnpackedRGBpixel (const csRGBpixel *pixels) |
Frees memory possibly allocated by UnpackRGBAtoRGBpixel(). | |
static void | DiscardPackedRGBA (const uint8 *rgba) |
Frees memory possibly allocated by PackRGBpixelToRGBA(). | |
static void | PackRGBpixelToRGBA (uint8 *buf, const csRGBpixel *pixels, size_t numPixels) |
Pack an array of csRGBpixel into a RGBA byte array. | |
static const uint8 * | PackRGBpixelToRGBA (const csRGBpixel *pixels, size_t numPixels) |
Pack an array of csRGBpixel into a RGBA byte array. | |
static csRGBcolor * | UnpackRGBAtoRGBcolor (const uint8 *rgba, size_t numPixels) |
Unpack a RGBA byte array into an array of csRGBcolor. | |
static void | UnpackRGBAtoRGBpixel (csRGBpixel *buf, const uint8 *rgba, size_t numPixels) |
Unpack a RGBA byte array into an array of csRGBpixel. | |
static const csRGBpixel * | UnpackRGBAtoRGBpixel (const uint8 *rgba, size_t numPixels) |
Unpack a RGBA byte array into an array of csRGBpixel. |
static csRGBpixel* csPackRGBA::CopyUnpackRGBAtoRGBpixel | ( | const uint8 * | rgba, |
size_t | numPixels | ||
) | [inline, static] |
Unpack a RGBA byte array into an array of csRGBpixel.
rgba
. Allocate memory. Free it using delete[] when finished. rgba | Source array of RGBA data |
numPixels | Number of pixels in the array |
static void csPackRGBA::csDiscardUnpackedRGBpixel | ( | const csRGBpixel * | pixels | ) | [inline, static] |
Frees memory possibly allocated by UnpackRGBAtoRGBpixel().
pixels | Pointer to csRGBpixel array returned by UnpackRGBAtoRGBpixel(). |
static void csPackRGBA::DiscardPackedRGBA | ( | const uint8 * | rgba | ) | [inline, static] |
Frees memory possibly allocated by PackRGBpixelToRGBA().
rgba | Pointer to packed RGB data returned by PackRGBpixelToRGBA(). |
static void csPackRGBA::PackRGBpixelToRGBA | ( | uint8 * | buf, |
const csRGBpixel * | pixels, | ||
size_t | numPixels | ||
) | [inline, static] |
Pack an array of csRGBpixel into a RGBA byte array.
buf | Buffer to pack the data into. |
pixels | Source array of csRGBpixel data |
numPixels | Number of pixels in the array |
static const uint8* csPackRGBA::PackRGBpixelToRGBA | ( | const csRGBpixel * | pixels, |
size_t | numPixels | ||
) | [inline, static] |
Pack an array of csRGBpixel into a RGBA byte array.
pixels
. May allocate memory. Free it using DiscardPackedRGBA() when finished. pixels | Source array of csRGBpixel data |
numPixels | Number of pixels in the array |
static csRGBcolor* csPackRGBA::UnpackRGBAtoRGBcolor | ( | const uint8 * | rgba, |
size_t | numPixels | ||
) | [inline, static] |
Unpack a RGBA byte array into an array of csRGBcolor.
Alpha information is discarded!
rgba | Source array of RGBA data |
numPixels | Number of pixels in the array |
static void csPackRGBA::UnpackRGBAtoRGBpixel | ( | csRGBpixel * | buf, |
const uint8 * | rgba, | ||
size_t | numPixels | ||
) | [inline, static] |
Unpack a RGBA byte array into an array of csRGBpixel.
buf | Buffer to unpack the data into. |
rgba | Source array of RGBA data |
numPixels | Number of pixels in the array |
static const csRGBpixel* csPackRGBA::UnpackRGBAtoRGBpixel | ( | const uint8 * | rgba, |
size_t | numPixels | ||
) | [inline, static] |
Unpack a RGBA byte array into an array of csRGBpixel.
pixels
. May allocate memory. Free it using DiscardUnpackedRGBpixel() when finished. rgba | Source array of RGBA data |
numPixels | Number of pixels in the array |