Simd Library Documentation.

Home | Release Notes | Download | Documentation | Forum | SourceForge | 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. 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. 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 GrayToBgra (const View< A > &gray, View< A > &bgra, uint8_t alpha=0xFF)
 Converts 8-bit gray image to 32-bit BGRA image. More...
 

Detailed Description

Functions for Gray-8 image conversions.

Function Documentation

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.

All images must have the same width and height.

Note
This function has a C++ wrapper Simd::GrayToBgr(const View<A>& gray, View<A>& bgr).
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 image.
[in]bgrStride- a row size of the bgr image.
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.

All images must have the same width and height.

Note
This function has a C++ wrapper Simd::GrayToBgra(const View<A>& gray, View<A>& bgra, 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 image.
[in]bgraStride- a row size of the bgra image.
[in]alpha- a value of alpha channel.
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.
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.