#include <c4d_basebitmap.h>
A helper class to convert the ColorProfile of bitmaps .
私有成员函数 |
|
ColorProfileConvert () | |
~ColorProfileConvert () | |
ColorProfileConvert (const ColorProfileConvert &src) | |
ColorProfileConvert & | operator= (const ColorProfileConvert &src) |
Alloc/Free |
|
static ColorProfileConvert * | Alloc (void) |
static void | Free ( ColorProfileConvert *&convert) |
Conversion |
|
Bool | PrepareTransform ( COLORMODE srccolormode, const ColorProfile *srcprofile, COLORMODE dstcolormode, const ColorProfile *dstprofile, Bool bgr) |
void | 转换 (const PIX *src, PIX *dst, Int32 cnt, Int32 SkipInputComponents, Int32 SkipOutputComponents) const |
|
|
|
private |
|
private |
|
static |
Allocates a ColorProfileConvert instance. Destroy the allocated ColorProfileConvert instance with Free() 。使用 AutoAlloc to automate the allocation and destruction based on scope.
|
static |
Destructs ColorProfileConvert instances allocated with Alloc() 。使用 AutoAlloc to automate the allocation and destruction based on scope.
[in,out] | convert | The ColorProfileConvert instance to destruct. If the pointer is nullptr nothing happens. The pointer is assigned nullptr afterwards. |
Bool PrepareTransform | ( | COLORMODE | srccolormode , |
const ColorProfile * | srcprofile , | ||
COLORMODE | dstcolormode , | ||
const ColorProfile * | dstprofile , | ||
Bool | bgr | ||
) |
Prepares the color conversion i.e. checks if a conversion is needed.
A conversion is only necessary if
true
is returned. Two identical color spaces will return
false
.
[in] | srccolormode | The source color mode: COLORMODE |
[in] | srcprofile | The source color profile: The caller owns the pointed color profile. |
[in] | dstcolormode | The destination color mode: COLORMODE |
[in] | dstprofile | The destination color profile: The caller owns the pointed color profile. |
[in] | bgr | true to swap the RGB channels, otherwise false .. Only necessary when working directly with Windows bitmaps. |
void Convert | ( | const PIX * | src , |
PIX * | dst , | ||
Int32 | cnt , | ||
Int32 | SkipInputComponents , | ||
Int32 | SkipOutputComponents | ||
) | const |
Converts the color profiles of the pixel data.
[in] | src | The pointer to the source pixel buffer. The caller owns the pointed buffer. |
[out] | dst | The pointer to the destination pixel buffer. The caller owns the pointed buffer. |
[in] | cnt | The number of pixels to convert. |
[in] | SkipInputComponents |
The number of bytes to skip in the source buffer after each converted pixel. For instance a RGB pixel contains 3 bytes.
After conversion the number of SkipInputComponents bytes is added to the source pointer. |
[in] | SkipOutputComponents |
The number of bytes to skip in the destination buffer after each converted pixel. For instance a RGB pixel contains 3 bytes.
After conversion the number of SkipOutputComponents bytes is added to the destination pointer. |