API Documentation
Static Public Member Functions | List of all members
nkImages::AlignmentUtils Class Referencefinal

Offers tools to realign an image's memory. More...

Static Public Member Functions

static void realignPixelsAndRows (unsigned char *output, const unsigned char *input, unsigned int width, unsigned int height, unsigned int outputPixelSize, unsigned int outputRowSize, unsigned int inputPixelSize, unsigned int inputRowSize)
 
static void realignPixelsAndRowsReorderRgb (unsigned char *output, const unsigned char *input, unsigned int width, unsigned int height, unsigned int outputPixelSize, unsigned int outputRowSize, unsigned int inputPixelSize, unsigned int inputRowSize, unsigned int channelByteSize)
 
static void realignPixels (unsigned char *output, const unsigned char *input, unsigned int width, unsigned int height, unsigned int outputPixelSize, unsigned int inputPixelSize)
 
static void realignPixelsReorderRgb (unsigned char *output, const unsigned char *input, unsigned int width, unsigned int height, unsigned int outputPixelSize, unsigned int inputPixelSize, unsigned int channelByteSize)
 
static void realignRows (unsigned char *output, const unsigned char *input, unsigned int height, unsigned int outputRowSize, unsigned int inputRowSize)
 
static unsigned int getAlignedSize (unsigned int byteSize, unsigned int byteAlignment)
 

Detailed Description

Offers tools to realign an image's memory.

Member Function Documentation

◆ realignPixelsAndRows()

static void nkImages::AlignmentUtils::realignPixelsAndRows ( unsigned char *  output,
const unsigned char *  input,
unsigned int  width,
unsigned int  height,
unsigned int  outputPixelSize,
unsigned int  outputRowSize,
unsigned int  inputPixelSize,
unsigned int  inputRowSize 
)
static

Realignment work over pixels / blocks and rows.

Parameters
outputThe output memory to copy to.
inputThe input memory to realign.
widthThe width of the image to process.
heightThe height of the image to process.
outputPixelSizeThe byte size of a block or pixel the output needs to satisfy.
outputRowSizeThe byte size of a row the output needs to satisfy.
inputPixelSizeThe byte size of a block or pixel the input satisfies.
inputRowSizeThe byte size of a row the input satisfies.
Remarks
The output memory needs to be already allocated when running this function.

◆ realignPixelsAndRowsReorderRgb()

static void nkImages::AlignmentUtils::realignPixelsAndRowsReorderRgb ( unsigned char *  output,
const unsigned char *  input,
unsigned int  width,
unsigned int  height,
unsigned int  outputPixelSize,
unsigned int  outputRowSize,
unsigned int  inputPixelSize,
unsigned int  inputRowSize,
unsigned int  channelByteSize 
)
static

Realignment work over pixels / blocks and rows, also reordering BGR channels into RGB.

Parameters
outputThe output memory to copy to.
inputThe input memory to realign.
widthThe width of the image to process.
heightThe height of the image to process.
outputPixelSizeThe byte size of a block or pixel the output needs to satisfy.
outputRowSizeThe byte size of a row the output needs to satisfy.
inputPixelSizeThe byte size of a block or pixel the input satisfies.
inputRowSizeThe byte size of a row the input satisfies.
channelByteSizeThe byte size of one color channel of a pixel.
Remarks
The output memory needs to be already allocated when running this function.

◆ realignPixels()

static void nkImages::AlignmentUtils::realignPixels ( unsigned char *  output,
const unsigned char *  input,
unsigned int  width,
unsigned int  height,
unsigned int  outputPixelSize,
unsigned int  inputPixelSize 
)
static

Realignment work over pixels / blocks.

Parameters
outputThe output memory to copy to.
inputThe input memory to realign.
widthThe width of the image to process.
heightThe height of the image to process.
outputPixelSizeThe byte size of a block or pixel the output needs to satisfy.
inputPixelSizeThe byte size of a block or pixel the input satisfies.
Remarks
The output memory needs to be already allocated when running this function.

◆ realignPixelsReorderRgb()

static void nkImages::AlignmentUtils::realignPixelsReorderRgb ( unsigned char *  output,
const unsigned char *  input,
unsigned int  width,
unsigned int  height,
unsigned int  outputPixelSize,
unsigned int  inputPixelSize,
unsigned int  channelByteSize 
)
static

Realignment work over pixels / blocks, also reordering BGR channels into RGB.

Parameters
outputThe output memory to copy to.
inputThe input memory to realign.
widthThe width of the image to process.
heightThe height of the image to process.
outputPixelSizeThe byte size of a block or pixel the output needs to satisfy.
inputPixelSizeThe byte size of a block or pixel the input satisfies.
channelByteSizeThe byte size of a color channel of a pixel.
Remarks
The output memory needs to be already allocated when running this function.

◆ realignRows()

static void nkImages::AlignmentUtils::realignRows ( unsigned char *  output,
const unsigned char *  input,
unsigned int  height,
unsigned int  outputRowSize,
unsigned int  inputRowSize 
)
static

Realignment work over rows.

Parameters
outputThe output memory to copy to.
inputThe input memory to realign.
heightThe height of the image to process.
outputRowSizeThe byte size of a row the output needs to satisfy.
inputRowSizeThe byte size of a row the input satisfies.
Remarks
The output memory needs to be already allocated when running this function.

◆ getAlignedSize()

static unsigned int nkImages::AlignmentUtils::getAlignedSize ( unsigned int  byteSize,
unsigned int  byteAlignment 
)
static

Computes the next aligned size from a given size and alignment constraint.

Parameters
byteSizeThe size which alignment should be made.
byteAlignmentThe alignment size should have.
Returns
A new size, fitting the alignment requirement, from the size given.

The documentation for this class was generated from the following file: