Ocean
|
This class implements a frame blender using an alpha channel to blend frames. More...
Data Structures | |
class | FrameChannels |
Helper class allowing to determine the number of channels of a frame. More... | |
class | SourceOffset |
Helper class allowing to determine the offset that is necessary to access the alpha channel. More... | |
class | TargetOffset |
Helper class allowing to determine the number of channels of the target frame. More... | |
Public Types | |
enum | AlphaTargetModulation { ATM_UNDEFINED = 0 , ATM_CONSTANT , ATM_BLEND } |
Definition of individual target alpha channel modulation functions. More... | |
typedef void(* | BlendFunction) (uint8_t *, const uint8_t) |
Definition of a blend function allowing to apply a more complex blend operation than a simple linear blending for one pixel (and thus for all channels of this pixel). More... | |
Static Public Member Functions | |
template<bool tTransparentIs0xFF> | |
static bool | blend (const Frame &source, Frame &target, const uint8_t alphaValue, Worker *worker=nullptr) |
Blends two frames with same frame type by application of one unique blending factor for all pixels. More... | |
template<bool tTransparentIs0xFF, AlphaTargetModulation tAlphaTargetModulation> | |
static bool | blend (const Frame &sourceWithAlpha, Frame &target, Worker *worker=nullptr) |
Blends an entire source frame holding an alpha channel with a target frame without an alpha channel. More... | |
template<bool tTransparentIs0xFF, AlphaTargetModulation tAlphaTargetModulation> | |
static bool | blend (const Frame &sourceWithAlpha, Frame &result, const uint8_t *backgroundColor, Worker *worker=nullptr) |
Blends an entire source frame holding an alpha channel with a static background color and creates a new frame without alpha channel. More... | |
template<bool tTransparentIs0xFF, FrameBlender::AlphaTargetModulation tAlphaTargetModulation> | |
static bool | blend (const Frame &sourceWithAlpha, Frame &target, const unsigned int sourceLeft, const unsigned int sourceTop, const unsigned int targetLeft, const unsigned int targetTop, const unsigned int width, const unsigned int height, Worker *worker=nullptr) |
Blends a sub-region of a source frame with a target frame without an alpha channel. More... | |
template<unsigned int tChannels, bool tTransparentIs0xFF> | |
static void | blend8BitPerChannel (const uint8_t *source, uint8_t *target, const uint8_t alphaValue, const unsigned int width, const unsigned int height, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Blends two 8 bit per channel frames with same frame type by application of one unique blending factor for all pixels. More... | |
template<unsigned int tChannels, bool tTransparentIs0xFF> | |
static void | blend8BitPerChannel (const uint8_t *source, const uint8_t *alpha, uint8_t *target, const unsigned int width, const unsigned int height, const unsigned int sourcePaddingElements, const unsigned int alphaPaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Blends an entire source and target frame while the alpha channel is provided in a third frame. More... | |
template<unsigned int tChannelsWithAlpha, bool tAlphaAtFront, bool tTargetHasAlpha, bool tTransparentIs0xFF, AlphaTargetModulation tAlphaTargetModulation> | |
static void | blend8BitPerChannel (const uint8_t *sourceWithAlpha, uint8_t *target, const unsigned int width, const unsigned int height, const unsigned int sourceWithAlphaPaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Blends an entire source and target frame while the alpha channel is in front of the data channels or behind the data channels. More... | |
template<unsigned int tChannels, bool tTransparentIs0xFF> | |
static void | blend8BitPerChannel (const uint8_t *alpha, uint8_t *target, const unsigned int width, const unsigned int height, const uint8_t *value, const unsigned int alphaPaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Blends a target frame with a specified constant value for all pixels, while each pixel might have a different blending factor. More... | |
template<unsigned int tChannels, bool tTransparentIs0xFF> | |
static void | blend8BitPerChannel (const uint8_t *alpha, uint8_t *target, const unsigned int width, const unsigned int height, const BlendFunction blendFunction, const unsigned int alphaPaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Blends a target frame with a specified blending function, while each pixel might have a different blending factor. More... | |
template<unsigned int tChannels, bool tTransparentIs0xFF> | |
static void | blend8BitPerChannel (const uint8_t *source, const uint8_t *alpha, uint8_t *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int targetWidth, const unsigned int targetHeight, const unsigned int sourceLeft, const unsigned int sourceTop, const unsigned int targetLeft, const unsigned int targetTop, const unsigned int width, const unsigned int height, const unsigned int sourcePaddingElements, const unsigned int alphaPaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Blends a sub-region of a source frame with a target frame while the alpha channel is provided in a third frame with frame size identical to the source frame. More... | |
template<unsigned int tChannelsWithAlpha, bool tAlphaAtFront, bool tTargetHasAlpha, bool tTransparentIs0xFF, FrameBlender::AlphaTargetModulation tAlphaTargetModulation> | |
static void | blend8BitPerChannel (const uint8_t *sourceWithAlpha, uint8_t *target, const unsigned int sourceWidth, const unsigned int sourceHeight, const unsigned int targetWidth, const unsigned int targetHeight, const unsigned int sourceLeft, const unsigned int sourceTop, const unsigned int targetLeft, const unsigned int targetTop, const unsigned int width, const unsigned int height, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, Worker *worker=nullptr) |
Blends a sub-region of a source frame with a target frame while the alpha channel is in front of the data channels or behind the data channels. More... | |
template<bool tTransparentIs0xFF> | |
static uint8_t | fullTransparent8Bit () |
Returns the alpha value for a fully transparent pixel. More... | |
template<bool tTransparentIs0xFF> | |
static uint8_t | fullOpaque8Bit () |
Returns the alpha value for a fully opaque pixel. More... | |
template<bool tTransparentIs0xFF> | |
static uint8_t | alpha8BitToTransparentIs0xFF (const uint8_t alpha) |
Converts a given alpha value so that 0xFF is interpreted as fully transparent. More... | |
template<bool tTransparentIs0xFF> | |
static uint8_t | alpha8BitToOpaqueIs0xFF (const uint8_t alpha) |
Converts a given alpha value so that 0xFF is interpreted as fully opaque. More... | |
template<> | |
uint8_t | fullTransparent8Bit () |
template<> | |
uint8_t | alpha8BitToTransparentIs0xFF (const uint8_t alpha) |
template<> | |
uint8_t | alpha8BitToOpaqueIs0xFF (const uint8_t alpha) |
Static Protected Member Functions | |
template<unsigned int tChannels, bool tTransparentIs0xFF> | |
static void | blend8BitPerChannelSubset (const uint8_t *source, uint8_t *target, const uint8_t alphaValue, const unsigned int width, const unsigned int sourcePaddingElements, const unsigned int targetPaddingElements, const unsigned int firstRow, const unsigned int numberRows) |
Blends a subset of two 8 bit per channels frames by application of one unique blending factor for all pixels. More... | |
template<unsigned int tChannels, bool tTransparentIs0xFF> | |
static void | blend8BitPerChannelSubset (const uint8_t *source, const uint8_t *alpha, uint8_t *target, const unsigned int width, const unsigned int sourcePaddingElements, const unsigned int alphaPaddingElements, const unsigned int targetPaddingElements, const unsigned int firstRow, const unsigned int numberRows) |
Blends a subset of a source and target frame (each 8 bit per channel) while the alpha channel is provided as a third frame. More... | |
template<unsigned int tChannelsWithAlpha, bool tAlphaAtFront, bool tTargetHasAlpha, bool tTransparentIs0xFF, AlphaTargetModulation tAlphaTargetModulation> | |
static void | blend8BitPerChannelSubset (const uint8_t *sourceWithAlpha, uint8_t *target, const unsigned int width, const unsigned int height, const unsigned int sourceWithAlphaPaddingElements, const unsigned int targetPaddingElements, const unsigned int firstRow, const unsigned int numberRows) |
Blends a subset of a source and target frame while the alpha channel is in front of the data channels or behind the data channels. More... | |
template<unsigned int tChannels, bool tTransparentIs0xFF> | |
static void | blend8BitPerChannelSubset (const uint8_t *alpha, uint8_t *target, const unsigned int width, const unsigned int height, const uint8_t *value, const unsigned int alphaPaddingElements, const unsigned int targetPaddingElements, const unsigned int firstRow, const unsigned int numberRows) |
Blends a subset of a target frame with a specified constant value for all pixels, while each pixel might have a different blending factor. More... | |
template<unsigned int tChannels, bool tTransparentIs0xFF> | |
static void | blend8BitPerChannelSubset (const uint8_t *alpha, uint8_t *target, const unsigned int width, const unsigned int height, const BlendFunction blendFunction, const unsigned int alphaPaddingElements, const unsigned int targetPaddingElements, const unsigned int firstRow, const unsigned int numberRows) |
Blends a subset of a target frame with a specified blending function, while each pixel might have a different blending factor. More... | |
template<bool tTransparentIs0xFF> | |
static uint8_t | sourceBlendFactor (const uint8_t alpha) |
Returns the blend factor for the source frame depending whether 0xFF is interpreted as transparent or opaque. More... | |
template<bool tTransparentIs0xFF> | |
static uint8_t | targetBlendFactor (const uint8_t alpha) |
Returns the blend factor for the target frame depending whether 0xFF is interpreted as transparent or opaque. More... | |
template<> | |
uint8_t | sourceBlendFactor (const uint8_t alpha) |
template<> | |
uint8_t | targetBlendFactor (const uint8_t alpha) |
This class implements a frame blender using an alpha channel to blend frames.
typedef void(* Ocean::CV::FrameBlender::BlendFunction) (uint8_t *, const uint8_t) |
Definition of a blend function allowing to apply a more complex blend operation than a simple linear blending for one pixel (and thus for all channels of this pixel).
If e.g., the target frame holds 3 channels, than all three channels have to be handled by one call of the blend function.
The first parameter provides the target pixel The second parameter provides the target blend factor, with range [0, 255]
Definition of individual target alpha channel modulation functions.
|
inlinestatic |
Converts a given alpha value so that 0xFF is interpreted as fully opaque.
alpha | The alpha value that will be converted |
tTransparentIs0xFF | True, if the given alpha is defined so that 0xFF is interpreted as fully transparent |
|
inlinestatic |
|
inlinestatic |
Converts a given alpha value so that 0xFF is interpreted as fully transparent.
alpha | The alpha value that will be converted |
tTransparentIs0xFF | True, if the given alpha is defined so that 0xFF is interpreted as fully transparent |
|
inlinestatic |
|
static |
Blends two frames with same frame type by application of one unique blending factor for all pixels.
The blend function is defined as follows:
tTransparentIs0xFF == true: targetPixel = sourcePixel * (0xFF - alpha) + targetPixel * alpha tTransparentIs0xFF == false: targetPixel = sourcePixel * alpha + targetPixel * (0xFF - alpha)
source | The source frame that is blended with the target frame, must be valid |
target | The target frame that receives the blending result from source and target pixels, this frame must have the same frame format as the source frame, must be valid |
alphaValue | Blending factor for all pixels, with range [0, 255] |
worker | Optional worker object to distribute the computation |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent |
|
static |
Blends an entire source frame holding an alpha channel with a static background color and creates a new frame without alpha channel.
An alpha value of 0xFF may specifies a fully transparent source pixel or may specify a fully opaque source pixel.
sourceWithAlpha | Source frame with alpha channel |
result | The resulting frame |
backgroundColor | The static background color for the resulting frame, ensure that the given buffer is large enough for the resulting pixel format (the source pixel format without alpha channel) |
worker | Optional worker object to distribute the computation |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent value |
tAlphaTargetModulation | The target alpha channel modulation function |
|
static |
Blends a sub-region of a source frame with a target frame without an alpha channel.
An alpha value of 0xFF may specifies a fully transparent source pixel or may specify a fully opaque source pixel.
The pixel format of the source frame must match to the pixel format of the target frame.
Valid combinations of pixel formats are e.g. (FORMAT_RGBA32, FORMAT_RGBA32) or (FORMAT_RGBA32, FORMAT_RGB24) or (FORMAT_ABGR32, FORMAT_ABGR32) or (FORMAT_ABGR32, FORMAT_BGR24).
sourceWithAlpha | Source frame with alpha channel, must be valid |
target | The target frame with or without alpha channel, if this frame has an alpha channel this channel will be untouched, must be valid |
sourceLeft | Horizontal start position inside the source frame, with range [0, sourceWidth) |
sourceTop | Vertical start position inside the source frame, with range [0, sourceHeight) |
targetLeft | Horizontal start position inside the target frame, with range [0, targetWidth) |
targetTop | Vertical start position inside the target frame, with range [0, targetHeight) |
width | The width of the blending sub-region in pixel, with range [1, min(sourceWidth - sourceLeft, targetWidth - targetLeft)] |
height | The height of the blending sub-region in pixel, with range [1, min(sourceHeight - sourceTop, targetHeight - targetTop)] |
worker | Optional worker object to distribute the computation |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent |
tAlphaTargetModulation | The target alpha channel modulation function |
|
static |
Blends an entire source frame holding an alpha channel with a target frame without an alpha channel.
An alpha value of 0xFF may specifies a fully transparent source pixel or may specify a fully opaque source pixel.
Both frames must have the same frame dimension and pixel origin.
Further, the pixel format of the source frame must match to the pixel format of the target frame.
Valid combinations of pixel formats are e.g. (FORMAT_RGBA32, FORMAT_RGBA32) or (FORMAT_RGBA32, FORMAT_RGB24) or (FORMAT_ABGR32, FORMAT_ABGR32) or (FORMAT_ABGR32, FORMAT_BGR24).
sourceWithAlpha | Source frame with alpha channel |
target | The target frame with or without alpha channel, if this frame has an alpha channel this channel will be untouched |
worker | Optional worker object to distribute the computation |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent value |
tAlphaTargetModulation | The target alpha channel modulation function |
|
inlinestatic |
Blends a target frame with a specified blending function, while each pixel might have a different blending factor.
alpha | The alpha frame defining the target blending factor that is applied for each pixel, must be valid |
target | The target frame without alpha channel that will be blended with the constant value parameter, must be valid |
width | The width of the target (and alpha) frame in pixel, with range [1, infinity) |
height | The height of the target (and alpha) frame in pixel, with range [1, infinity) |
blendFunction | Blending function allowing to apply a more complex blending function than a simple linear blending, the blend function will receive 0x00 for opaque pixels and 0xFF for transparent pixels as blend factor |
alphaPaddingElements | The number of padding elements at the end of each alpha frame row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target frame row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
tChannels | Number of channels of both data frame (without any alpha channel) |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent |
|
inlinestatic |
Blends a target frame with a specified constant value for all pixels, while each pixel might have a different blending factor.
alpha | The alpha frame defining the value blending factor that is applied for each pixel, must be valid |
target | The target frame without alpha channel that will be blended with the constant value parameter, must be valid |
width | The width of the target (and alpha) frame in pixel, with range [1, infinity) |
height | The height of the target (and alpha) frame in pixel, with range [1, infinity) |
value | Constant blending value that is used for each pixel, must be valid |
alphaPaddingElements | The number of padding elements at the end of each alpha frame row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target frame row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
tChannels | Number of channels of both data frame (without any alpha channel) |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent |
|
inlinestatic |
Blends a sub-region of a source frame with a target frame while the alpha channel is provided in a third frame with frame size identical to the source frame.
source | The source frame without alpha channel, must be valid |
alpha | The alpha frame defining the alpha channel connected with the source frame, must be valid |
target | The target frame without alpha channel, must be valid |
sourceWidth | Width of the source (and alpha) frame in pixel, with range [1, infinity) |
sourceHeight | Height of the source (and alpha) frame in pixel, with range [1, infinity) |
targetWidth | Width of the target frame in pixel, with range [1, infinity) |
targetHeight | Height of the target frame in pixel, with range [1, infinity) |
sourceLeft | Horizontal start position inside the source frame, with range [0, sourceWidth) |
sourceTop | Vertical start position inside the source frame, with range [0, sourceHeight) |
targetLeft | Horizontal start position inside the target frame, with range [0, targetWidth) |
targetTop | Vertical start position inside the target frame, with range [0, targetHeight) |
width | The width of the blending sub-region in pixel, with range [1, min(sourceWidth - sourceLeft, targetWidth - targetLeft)] |
height | The height of the blending sub-region in pixel, with range [1, min(sourceHeight - sourceTop, targetHeight - targetTop)] |
sourcePaddingElements | The number of padding elements at the end of each row in the source frame, in elements, with range [0, infinity) |
alphaPaddingElements | The number of padding elements at the end of each row in the alpha frame, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each row in the target frame, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
tChannels | Number of channels of both data frame (without any alpha channel) |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent |
|
inlinestatic |
Blends an entire source and target frame while the alpha channel is provided in a third frame.
tTransparentIs0xFF == true: targetPixel = sourcePixel * (0xFF - alphaPixel) + targetPixel * alphaPixel tTransparentIs0xFF == false: targetPixel = sourcePixel * alphaPixel + targetPixel * (0xFF - alphaPixel)
source | The source frame without alpha channel, which is blended with the target frame, must be valid |
alpha | The alpha frame with defining one alpha blending factor for each pixel, must be valid |
target | The target frame without alpha channel, must be valid |
width | The width of both frames in pixel, with range [1, infinity) |
height | The height of the both frames in pixel, with range [1, infinity) |
sourcePaddingElements | The optional number of padding elements at the end of each source row, in elements, with range [0, infinity) |
alphaPaddingElements | The optional number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The optional number of padding elements at the end of each target row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
tChannels | Number of channels of both frames (without any alpha channel), with range [1, infinity) |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent; False, if 0x00 is interpreted as fully transparent |
|
inlinestatic |
Blends two 8 bit per channel frames with same frame type by application of one unique blending factor for all pixels.
The blend function is defined as follows:
tTransparentIs0xFF == true: targetPixel = sourcePixel * (0xFF - alpha) + targetPixel * alpha tTransparentIs0xFF == false: targetPixel = sourcePixel * alpha + targetPixel * (0xFF - alpha)
source | The source frame that is blended with the target frame, must be valid |
target | The target frame that receives the blending result from source and target pixels, this frame must have the same frame format as the source frame, must be valid |
alphaValue | The blending factor for all pixels, with range [0, 255] |
width | The width of both frames in pixel, with range [1, infinity) |
height | The height of the both frames in pixel, with range [1, infinity) |
sourcePaddingElements | The optional number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The optional number of padding elements at the end of each target row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
tChannels | Number of channels of both frames (without any alpha channel), with range [1, infinity) |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent; False, if 0x00 is interpreted as fully transparent |
|
inlinestatic |
Blends a sub-region of a source frame with a target frame while the alpha channel is in front of the data channels or behind the data channels.
sourceWithAlpha | Source frame with alpha channel, must be valid |
target | The target frame which may also hold an alpha channel depending on tTargetHasAlpha, must be valid |
sourceWidth | Width of the source frame in pixel, with range [1, infinity) |
sourceHeight | Height of the source frame in pixel, with range [1, infinity) |
targetWidth | Width of the target frame in pixel, with range [1, infinity) |
targetHeight | Height of the target frame in pixel, with range [1, infinity) |
sourceLeft | Horizontal start position inside the source frame, with range [0, sourceWidth) |
sourceTop | Vertical start position inside the source frame, with range [0, sourceHeight) |
targetLeft | Horizontal start position inside the target frame, with range [0, targetWidth) |
targetTop | Vertical start position inside the target frame, with range [0, targetHeight) |
width | The width of the blending sub-region in pixel, with range [1, min(sourceWidth - sourceLeft, targetWidth - targetLeft)] |
height | The height of the blending sub-region in pixel, with range [1, min(sourceHeight - sourceTop, targetHeight - targetTop)] |
sourcePaddingElements | The number of padding elements at the end of each row in the source frame, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each row in the target frame, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
tChannelsWithAlpha | Number of channels in the source frame (including the alpha channel) |
tAlphaAtFront | True, if the alpha channel is in the front of the data channels |
tTargetHasAlpha | True, if not only the source frame holds an alpha channel but also the target frame, however values in a target alpha channel will be untouched |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent |
tAlphaTargetModulation | The target alpha channel modulation function |
|
inlinestatic |
Blends an entire source and target frame while the alpha channel is in front of the data channels or behind the data channels.
sourceWithAlpha | Source frame with alpha channel, must be valid |
target | The target frame which may also hold an alpha channel depending on tTargetHasAlpha, must be valid |
width | The width of both frames in pixel, with range [1, infinity) |
height | The height of both frames in pixel, with range [1, infinity) |
sourceWithAlphaPaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
worker | Optional worker object to distribute the computation |
tChannelsWithAlpha | Number of channels in the source frame (including the alpha channel) |
tAlphaAtFront | True, if the alpha channel is in the front of the data channels |
tTargetHasAlpha | True, if not only the source frame holds an alpha channel but also the target frame, however values in a target alpha channel will be untouched |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent |
tAlphaTargetModulation | The target alpha channel modulation function |
|
staticprotected |
Blends a subset of a target frame with a specified blending function, while each pixel might have a different blending factor.
alpha | The alpha frame defining the target blending factor that is applied for each pixel |
target | The target frame without alpha channel that will be blended with the constant value parameter |
width | The width of the target (and alpha) frame in pixel, with range [1, infinity) |
height | The height of the target (and alpha) frame in pixel, with range [1, infinity) |
blendFunction | Blending function allowing to apply a more complex blending function than a simple linear blending, the blend function will receive 0x00 for opaque pixels and 0xFF for transparent pixels as blend factor |
alphaPaddingElements | The optional number of padding elements at the end of each alpha row, in elements, with range [0, infinity) |
targetPaddingElements | The optional number of padding elements at the end of each target row, in elements, with range [0, infinity) |
firstRow | First row of the sub-region to be handled, with range [0, height - 1] |
numberRows | Number of rows of the sub-region to be handled, with range [1, height - firstRow] |
tChannels | Number of channels of both data frame (without any alpha channel), with range [1, infinity) |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent |
|
staticprotected |
Blends a subset of a target frame with a specified constant value for all pixels, while each pixel might have a different blending factor.
alpha | The alpha frame defining the value blending factor that is applied for each pixel |
target | The target frame without alpha channel that will be blended with the constant value parameter |
width | The width of the target (and alpha) frame in pixel, with range [1, infinity) |
height | The height of the target (and alpha) frame in pixel, with range [1, infinity) |
value | Constant blending value that is used for each pixel |
alphaPaddingElements | The number of padding elements at the end of each alpha frame row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target frame row, in elements, with range [0, infinity) |
firstRow | First row to be handled, with range [0, height - 1] |
numberRows | Number of rows to be handled, with range [1, height - firstRow] |
tChannels | Number of channels of both data frame (without any alpha channel), with range [1, infinity) |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent |
|
staticprotected |
Blends a subset of a source and target frame (each 8 bit per channel) while the alpha channel is provided as a third frame.
source | The source frame that is blended with the target frame, must be valid |
alpha | The alpha frame with defining one alpha blending factor for each pixel, must be valid |
target | The target frame that receives the blending result from source and target pixels, this frame must have the same frame format as the source frame, must be valid |
width | The width of all frames, in pixel, with range [1, infinity) |
sourcePaddingElements | The optional number of padding elements at the end of each source row, in elements, with range [0, infinity) |
alphaPaddingElements | The optional number of padding elements at the end of each alpha row, in elements, with range [0, infinity) |
targetPaddingElements | The optional number of padding elements at the end of each target row, in elements, with range [0, infinity) |
firstRow | The first row to be handled, with range [0, height - 1] |
numberRows | The number of rows to be handled, with range [1, height - firstRow] |
tChannels | Number of channels of both data frame (without any alpha channel), with range [1, infinity) |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent; False, if 0x00 is interpreted as fully transparent |
|
staticprotected |
Blends a subset of two 8 bit per channels frames by application of one unique blending factor for all pixels.
source | The source frame that is blended with the target frame, must be valid |
target | The target frame that receives the blending result from source and target pixels, this frame must have the same frame format as the source frame, must be valid |
alphaValue | The blending factor for all pixels, with range [0, 255] |
width | The width of both frames in pixel, with range [1, infinity) |
sourcePaddingElements | The optional number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The optional number of padding elements at the end of each target row, in elements, with range [0, infinity) |
firstRow | First row to be handled, with range [0, height - 1] |
numberRows | Number of rows to be handled, with range [1, height - firstRow] |
tChannels | Number of channels of both data frame (without any alpha channel), with range [1, infinity) |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent; False, if 0x00 is interpreted as fully transparent |
|
staticprotected |
Blends a subset of a source and target frame while the alpha channel is in front of the data channels or behind the data channels.
sourceWithAlpha | Source frame with alpha channel, must be valid |
target | The target frame which may also hold an alpha channel depending on tTargetHasAlpha, must be valid |
width | The width of both frames in pixel, with range [1, infinity) |
height | The height of both frames in pixel, with range [1, infinity) |
sourceWithAlphaPaddingElements | The number of padding elements at the end of each source row, in elements, with range [0, infinity) |
targetPaddingElements | The number of padding elements at the end of each target row, in elements, with range [0, infinity) |
firstRow | First row to be handled, with range [0, height - 1] |
numberRows | Number of rows to be handled, with range [1, height - firstRow] |
tChannelsWithAlpha | Number of channels in the source frame (including the alpha channel), with range [2, infinity) |
tAlphaAtFront | True, if the alpha channel is in the front of the data channels |
tTargetHasAlpha | True, if not only the source frame holds an alpha channel but also the target frame, however values in a target alpha channel will be untouched |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent |
tAlphaTargetModulation | The target alpha channel modulation function |
|
inlinestatic |
Returns the alpha value for a fully opaque pixel.
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent |
|
inlinestatic |
Returns the alpha value for a fully transparent pixel.
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent |
|
inlinestatic |
|
inlinestaticprotected |
Returns the blend factor for the source frame depending whether 0xFF is interpreted as transparent or opaque.
alpha | The alpha value for which the blending factor is returned, with range [0, 255] |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent value; False, if 0x00 is interpreted as fully transparent |
|
inlinestaticprotected |
|
inlinestaticprotected |
Returns the blend factor for the target frame depending whether 0xFF is interpreted as transparent or opaque.
alpha | The alpha value for which the blending factor is returned, with range [0, 255] |
tTransparentIs0xFF | True, if 0xFF is interpreted as fully transparent value; False, if 0x00 is interpreted as fully transparent |
|
inlinestaticprotected |