Simd Library Documentation.

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

Functions for Gray-8 image conversions. More...

Functions

SIMD_API void SimdGrayToBgr (const uint8_t *gray, size_t width, size_t height, size_t grayStride, uint8_t *bgr, size_t bgrStride)
 Converts 8-bit gray image to 24-bit BGR image. Also it can be used for 8-bit gray to 24-bit RGB conversion. More...
 
SIMD_API void SimdGrayToBgra (const uint8_t *gray, size_t width, size_t height, size_t grayStride, uint8_t *bgra, size_t bgraStride, uint8_t alpha)
 Converts 8-bit gray image to 32-bit BGRA image. Also it can be used for 8-bit gray to 32-bit RGBA conversion. More...
 
SIMD_API void SimdGrayToY (const uint8_t *gray, size_t grayStride, size_t width, size_t height, uint8_t *y, size_t yStride)
 Converts 8-bit gray image to 8-bit Y-plane of YUV. More...
 
template<template< class > class A>
SIMD_INLINE void GrayToBgr (const View< A > &gray, View< A > &bgr)
 Converts 8-bit gray image to 24-bit BGR image. More...
 
template<template< class > class A>
SIMD_INLINE void GrayToRgb (const View< A > &gray, View< A > &rgb)
 Converts 8-bit gray image to 24-bit RGB image. More...
 
template<template< class > class A>
SIMD_INLINE void GrayToBgra (const View< A > &gray, View< A > &bgra, uint8_t alpha=0xFF)
 Converts 8-bit gray image to 32-bit BGRA image. More...
 
template<template< class > class A>
SIMD_INLINE void GrayToRgba (const View< A > &gray, View< A > &rgba, uint8_t alpha=0xFF)
 Converts 8-bit gray image to 32-bit RGBA image. More...
 
template<template< class > class A>
SIMD_INLINE void GrayToY (const View< A > &gray, View< A > &y)
 Converts 8-bit gray image to 8-bit Y plane of YUV image. More...
 

Detailed Description

Functions for Gray-8 image conversions.

Function Documentation

◆ SimdGrayToBgr()

void SimdGrayToBgr ( const uint8_t *  gray,
size_t  width,
size_t  height,
size_t  grayStride,
uint8_t *  bgr,
size_t  bgrStride 
)

Converts 8-bit gray image to 24-bit BGR image. Also it can be used for 8-bit gray to 24-bit RGB conversion.

All images must have the same width and height.

Note
This function has C++ wrappers: Simd::GrayToBgr(const View<A>& gray, View<A>& bgr) and Simd::GrayToRgb(const View<A>& gray, View<A>& rgb).
Parameters
[in]gray- a pointer to pixels data of input 8-bit gray image.
[in]width- an image width.
[in]height- an image height.
[in]grayStride- a row size of the gray image.
[out]bgr- a pointer to pixels data of output 24-bit BGR (or 24-bit RGB) image.
[in]bgrStride- a row size of the bgr image.

◆ SimdGrayToBgra()

void SimdGrayToBgra ( const uint8_t *  gray,
size_t  width,
size_t  height,
size_t  grayStride,
uint8_t *  bgra,
size_t  bgraStride,
uint8_t  alpha 
)

Converts 8-bit gray image to 32-bit BGRA image. Also it can be used for 8-bit gray to 32-bit RGBA conversion.

All images must have the same width and height.

Note
This function has C++ wrappers: Simd::GrayToBgra(const View<A>& gray, View<A>& bgra, uint8_t alpha) and Simd::GrayToRgba(const View<A>& gray, View<A>& rgba, uint8_t alpha).
Parameters
[in]gray- a pointer to pixels data of input 8-bit gray image.
[in]width- an image width.
[in]height- an image height.
[in]grayStride- a row size of the gray image.
[out]bgra- a pointer to pixels data of output 32-bit BGRA (or 32-bit RGBA) image.
[in]bgraStride- a row size of the bgra image.
[in]alpha- a value of alpha channel.

◆ SimdGrayToY()

SimdGrayToY ( const uint8_t *  gray,
size_t  width,
size_t  height,
size_t  grayStride,
uint8_t *  y,
size_t  yStride 
)

Converts 8-bit gray image to 8-bit Y-plane of YUV.

All images must have the same width and height.

Note
This function has C++ wrappers: Simd::GrayToY(const View<A>& gray, View<A>& y).
Parameters
[in]gray- a pointer to pixels data of input 8-bit gray image.
[in]grayStride- a row size of the gray image.
[in]width- an image width.
[in]height- an image height.
[out]y- a pointer to pixels data of output 8-bit Y plane of YUV image.
[in]yStride- a row size of the y image.

◆ GrayToBgr()

void GrayToBgr ( const View< A > &  gray,
View< A > &  bgr 
)

Converts 8-bit gray image to 24-bit BGR image.

All images must have the same width and height.

Note
This function is a C++ wrapper for function SimdGrayToBgr.
Parameters
[in]gray- an input 8-bit gray image.
[out]bgr- an output 24-bit BGR image.

◆ GrayToRgb()

void GrayToRgb ( const View< A > &  gray,
View< A > &  rgb 
)

Converts 8-bit gray image to 24-bit RGB image.

All images must have the same width and height.

Note
This function is a C++ wrapper for function SimdGrayToBgr.
Parameters
[in]gray- an input 8-bit gray image.
[out]rgb- an output 24-bit RGB image.

◆ GrayToBgra()

void GrayToBgra ( const View< A > &  gray,
View< A > &  bgra,
uint8_t  alpha = 0xFF 
)

Converts 8-bit gray image to 32-bit BGRA image.

All images must have the same width and height.

Note
This function is a C++ wrapper for function SimdGrayToBgra.
Parameters
[in]gray- an input 8-bit gray image.
[out]bgra- an output 32-bit BGRA image.
[in]alpha- a value of alpha channel. It is equal to 255 by default.

◆ GrayToRgba()

void GrayToRgba ( const View< A > &  gray,
View< A > &  rgba,
uint8_t  alpha = 0xFF 
)

Converts 8-bit gray image to 32-bit RGBA image.

All images must have the same width and height.

Note
This function is a C++ wrapper for function SimdGrayToBgra.
Parameters
[in]gray- an input 8-bit gray image.
[out]rgba- an output 32-bit RGBA image.
[in]alpha- a value of alpha channel. It is equal to 255 by default.

◆ GrayToY()

void GrayToY ( const View< A > &  gray,
View< A > &  y 
)

Converts 8-bit gray image to 8-bit Y plane of YUV image.

All images must have the same width and height.

Note
This function is a C++ wrapper for function SimdGrayToY.
Parameters
[in]gray- an input 8-bit gray image.
[out]y- an output 8-bit Y plane of YUV image.