Padding

Set the padding around an image. More...



int rapp_pad_align_u8 (uint8_t *buf, int dim, int width, int height, int value)
 Sets the alignment pixels to value.
int rapp_pad_const_u8 (uint8_t *buf, int dim, int width, int height, int size, int value)
 Pad an 8-bit image with a constant value.
int rapp_pad_clamp_u8 (uint8_t *buf, int dim, int width, int height, int size)
 Pad an 8-bit image by clamping the edge value.



int rapp_pad_align_bin (uint8_t *buf, int dim, int off, int width, int height, int value)
 Sets the alignment pixels to value.
int rapp_pad_const_bin (uint8_t *buf, int dim, int off, int width, int height, int size, int set)
 Pad a binary image with a constant value.
int rapp_pad_clamp_bin (uint8_t *buf, int dim, int off, int width, int height, int size)
 Pad a binary image by clamping the edge value.

Detailed Description

Set the padding around an image.

The functions that accept a size in pixels of the padding will set exactly this number of pixels in the top and bottom padding, but may set left and right padding pixels up to the nearest alignment boundaries.

The images may be misaligned.

Next section: Geometrical Transformations


Function Documentation

int rapp_pad_align_u8 ( uint8_t *  buf,
int  dim,
int  width,
int  height,
int  value 
)

Sets the alignment pixels to value.

The alignment pixels consists of the pixels to the left and right of the actual image area, up to the nearest alignment boundary.

Parameters:
[in,out] buf Pixel buffer, possibly misaligned.
dim Row dimension of the buffer.
width Image width in pixels.
height Image height in pixels.
value The value, in the range 0-255.
Returns:
A negative error code on error, zero otherwise.
int rapp_pad_align_bin ( uint8_t *  buf,
int  dim,
int  off,
int  width,
int  height,
int  value 
)

Sets the alignment pixels to value.

The alignment pixels consists of the pixels to the left (including the binary offset) and right of the actual image area, up to the nearest alignment boundary.

Parameters:
[in,out] buf Pixel buffer, possibly misaligned.
dim Row dimension of the buffer.
off Bit offset of the buffer, in the range 0-7.
width Image width in pixels.
height Image height in pixels.
value The boolean value to set.
Returns:
A negative error code on error, zero otherwise.
int rapp_pad_const_u8 ( uint8_t *  buf,
int  dim,
int  width,
int  height,
int  size,
int  value 
)

Pad an 8-bit image with a constant value.

Parameters:
[in,out] buf Pixel buffer, possibly misaligned.
dim Row dimension of the buffer.
width Image width in pixels.
height Image height in pixels.
size Size of the padding in pixels.
value Padding value, in the range 0-255.
Returns:
A negative error code on error, zero otherwise.
int rapp_pad_clamp_u8 ( uint8_t *  buf,
int  dim,
int  width,
int  height,
int  size 
)

Pad an 8-bit image by clamping the edge value.

Parameters:
[in,out] buf Pixel buffer, possibly misaligned.
dim Row dimension of the buffer.
width Image width in pixels.
height Image height in pixels.
size Size of the padding in pixels.
Returns:
A negative error code on error, zero otherwise.
int rapp_pad_const_bin ( uint8_t *  buf,
int  dim,
int  off,
int  width,
int  height,
int  size,
int  set 
)

Pad a binary image with a constant value.

Parameters:
[in,out] buf Pixel buffer, possibly misaligned.
dim Row dimension of the buffer.
off Bit offset of the buffer, in the range 0-7.
width Image width in pixels.
height Image height in pixels.
size Size of the padding in pixels.
set The boolean value to set.
Returns:
A negative error code on error, zero otherwise.
int rapp_pad_clamp_bin ( uint8_t *  buf,
int  dim,
int  off,
int  width,
int  height,
int  size 
)

Pad a binary image by clamping the edge value.

Parameters:
[in,out] buf Pixel buffer, possibly misaligned.
dim Row dimension of the buffer.
off Bit offset of the buffer, in the range 0-7.
width Image width in pixels.
height Image height in pixels.
size Size of the padding in pixels.
Returns:
A negative error code on error, zero otherwise.

Generated on 1 Jun 2016 for RAPP by  doxygen 1.6.1