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. |
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
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.
[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. |
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.
[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. |
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.
[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. |
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.
[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. |
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.
[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. |
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.
[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. |