Simd Library Documentation.

Home | Release Notes | Download | Documentation | Issues | GitHub

Functions for image filling. More...

Functions

SIMD_API void SimdFill (uint8_t *dst, size_t stride, size_t width, size_t height, size_t pixelSize, uint8_t value)
 Fills pixels data of image by given value. More...
 
SIMD_API void SimdFillFrame (uint8_t *dst, size_t stride, size_t width, size_t height, size_t pixelSize, size_t frameLeft, size_t frameTop, size_t frameRight, size_t frameBottom, uint8_t value)
 Fills pixels data of image except for the portion bounded frame by given value. More...
 
SIMD_API void SimdFillBgr (uint8_t *dst, size_t stride, size_t width, size_t height, uint8_t blue, uint8_t green, uint8_t red)
 Fills pixels data of 24-bit BGR image by given color(blue, green, red). More...
 
SIMD_API void SimdFillBgra (uint8_t *dst, size_t stride, size_t width, size_t height, uint8_t blue, uint8_t green, uint8_t red, uint8_t alpha)
 Fills pixels data of 32-bit BGRA image by given color(blue, green, red, alpha). More...
 
SIMD_API void SimdFillPixel (uint8_t *dst, size_t stride, size_t width, size_t height, const uint8_t *pixel, size_t pixelSize)
 Fills image by value of given pixel. More...
 
SIMD_API void SimdFill32f (float *dst, size_t size, const float *value)
 Fills 32-bit float array by given value. More...
 
template<template< class > class A>
SIMD_INLINE void Fill (View< A > &dst, uint8_t value)
 Fills pixels data of image by given value. More...
 
template<template< class > class A>
SIMD_INLINE void FillFrame (View< A > &dst, const Rectangle< ptrdiff_t > &frame, uint8_t value)
 Fills pixels data of image except for the portion bounded frame by given value. More...
 
template<template< class > class A>
SIMD_INLINE void FillBgr (View< A > &dst, uint8_t blue, uint8_t green, uint8_t red)
 Fills pixels data of 24-bit BGR image by given color(blue, green, red). More...
 
template<template< class > class A>
SIMD_INLINE void FillBgra (View< A > &dst, uint8_t blue, uint8_t green, uint8_t red, uint8_t alpha=0xFF)
 Fills pixels data of 32-bit BGRA image by given color(blue, green, red, alpha). More...
 
template<template< class > class A, class Pixel >
SIMD_INLINE void FillPixel (View< A > &dst, const Pixel &pixel)
 Fills image by value of given pixel. More...
 

Detailed Description

Functions for image filling.

Function Documentation

◆ SimdFill()

void SimdFill ( uint8_t *  dst,
size_t  stride,
size_t  width,
size_t  height,
size_t  pixelSize,
uint8_t  value 
)

Fills pixels data of image by given value.

Note
This function has a C++ wrapper Simd::Fill(View<A>& dst, uint8_t value).
Parameters
[out]dst- a pointer to pixels data of destination image.
[in]stride- a row size of the dst image.
[in]width- an image width.
[in]height- an image height.
[in]pixelSize- a size of the image pixel.
[in]value- a value to fill image.

◆ SimdFillFrame()

void SimdFillFrame ( uint8_t *  dst,
size_t  stride,
size_t  width,
size_t  height,
size_t  pixelSize,
size_t  frameLeft,
size_t  frameTop,
size_t  frameRight,
size_t  frameBottom,
uint8_t  value 
)

Fills pixels data of image except for the portion bounded frame by given value.

Note
This function has a C++ wrapper Simd::FillFrame(View<A>& dst, const Rectangle<ptrdiff_t> & frame, uint8_t value).
Parameters
[out]dst- a pointer to pixels data of destination image.
[in]stride- a row size of the dst image.
[in]width- an image width.
[in]height- an image height.
[in]pixelSize- a size of the image pixel.
[in]frameLeft- a frame left side.
[in]frameTop- a frame top side.
[in]frameRight- a frame right side.
[in]frameBottom- a frame bottom side.
[in]value- a value to fill image.

◆ SimdFillBgr()

void SimdFillBgr ( uint8_t *  dst,
size_t  stride,
size_t  width,
size_t  height,
uint8_t  blue,
uint8_t  green,
uint8_t  red 
)

Fills pixels data of 24-bit BGR image by given color(blue, green, red).

Note
This function has a C++ wrapper Simd::FillBgr(View<A>& dst, uint8_t blue, uint8_t green, uint8_t red).
Parameters
[out]dst- a pointer to pixels data of destination image.
[in]stride- a row size of the dst image.
[in]width- an image width.
[in]height- an image height.
[in]blue- a blue channel of BGR to fill image.
[in]green- a green channel of BGR to fill image.
[in]red- a red channel of BGR to fill image.

◆ SimdFillBgra()

void SimdFillBgra ( uint8_t *  dst,
size_t  stride,
size_t  width,
size_t  height,
uint8_t  blue,
uint8_t  green,
uint8_t  red,
uint8_t  alpha 
)

Fills pixels data of 32-bit BGRA image by given color(blue, green, red, alpha).

Note
This function has a C++ wrapper Simd::FillBgra(View<A>& dst, uint8_t blue, uint8_t green, uint8_t red, uint8_t alpha).
Parameters
[out]dst- a pointer to pixels data of destination image.
[in]stride- a row size of the dst image.
[in]width- an image width.
[in]height- an image height.
[in]blue- a blue channel of BGRA to fill image.
[in]green- a green channel of BGRA to fill image.
[in]red- a red channel of BGRA to fill image.
[in]alpha- a alpha channel of BGRA to fill image.

◆ SimdFillPixel()

void SimdFillPixel ( uint8_t *  dst,
size_t  stride,
size_t  width,
size_t  height,
const uint8_t *  pixel,
size_t  pixelSize 
)

Fills image by value of given pixel.

Note
This function has a C++ wrapper Simd::FillPixel(View<A> & dst, const Pixel & pixel).
Parameters
[out]dst- a pointer to pixels data of destination image.
[in]stride- a row size of the dst image.
[in]width- an image width.
[in]height- an image height.
[in]pixel- a pointer to pixel to fill.
[in]pixelSize- a size of the image pixel. Parameter is restricted by range [1, 4].

◆ SimdFill32f()

void SimdFill32f ( float *  dst,
size_t  size,
const float *  value 
)

Fills 32-bit float array by given value.

Parameters
[out]dst- a pointer to 32-bit float array.
[in]size- a size of the array.
[in]value- a pointer to value to fill. Can be NULL (filling value is assumed to be equal to zero).

◆ Fill()

void Fill ( View< A > &  dst,
uint8_t  value 
)

Fills pixels data of image by given value.

Note
This function is a C++ wrapper for function SimdFill.
Parameters
[out]dst- a destination image.
[in]value- a value to fill image.

◆ FillFrame()

void FillFrame ( View< A > &  dst,
const Rectangle< ptrdiff_t > &  frame,
uint8_t  value 
)

Fills pixels data of image except for the portion bounded frame by given value.

Note
This function is a C++ wrapper for function SimdFillFrame.
Parameters
[out]dst- a destination image.
[in]frame- a frame rectangle.
[in]value- a value to fill image.

◆ FillBgr()

void FillBgr ( View< A > &  dst,
uint8_t  blue,
uint8_t  green,
uint8_t  red 
)

Fills pixels data of 24-bit BGR image by given color(blue, green, red).

Note
This function is a C++ wrapper for function SimdFillBgr.
Parameters
[out]dst- a destination image.
[in]blue- a blue channel of BGR to fill image.
[in]green- a green channel of BGR to fill image.
[in]red- a red channel of BGR to fill image.

◆ FillBgra()

void FillBgra ( View< A > &  dst,
uint8_t  blue,
uint8_t  green,
uint8_t  red,
uint8_t  alpha = 0xFF 
)

Fills pixels data of 32-bit BGRA image by given color(blue, green, red, alpha).

Note
This function is a C++ wrapper for function SimdFillBgra.
Parameters
[out]dst- a destination image.
[in]blue- a blue channel of BGRA to fill image.
[in]green- a green channel of BGRA to fill image.
[in]red- a red channel of BGRA to fill image.
[in]alpha- a alpha channel of BGRA to fill image. It is equal to 255 by default.

◆ FillPixel()

void FillPixel ( View< A > &  dst,
const Pixel &  pixel 
)

Fills image by value of given pixel.

Note
This function is a C++ wrapper for function SimdFillPixel.
Parameters
[out]dst- a destination image.
[in]pixel- a pixel of type which correspond to image format. The size of the type is restricted by range [1, 4].