Simd Library Documentation.

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

32-bit BGRA pixel. More...

Public Member Functions

 Bgra32 (const uint8_t &gray=uint8_t(0), const uint8_t &a=uint8_t(255))
 
 Bgra32 (const uint8_t &b, const uint8_t &g, const uint8_t &r, const uint8_t &a=uint8_t(255))
 
 Bgra32 (const Bgr24 &p, const uint8_t &a=uint8_t(255))
 
 Bgra32 (const Bgra32 &p)
 

Static Public Member Functions

template<template< class > class A>
static const Bgra32At (const View< A > &view, ptrdiff_t col, ptrdiff_t row)
 
template<template< class > class A>
static Bgra32At (View< A > &view, ptrdiff_t col, ptrdiff_t row)
 

Data Fields

uint8_t blue
 8-bit blue channel 32-bit BGRA pixel.
 
uint8_t green
 8-bit green channel 32-bit BGRA pixel.
 
uint8_t red
 8-bit red channel 32-bit BGRA pixel.
 
uint8_t alpha
 8-bit alpha channel 32-bit BGRA pixel.
 

Detailed Description

32-bit BGRA pixel.

Provides manipulation of 32-bit BGRA (Blue, Green, Red, Alpha) pixels of the View struct.

Constructor & Destructor Documentation

◆ Bgra32() [1/4]

SIMD_INLINE Bgra32 ( const uint8_t &  gray = uint8_t(0),
const uint8_t &  a = uint8_t(255) 
)

Creates a new 32-bit BGRA pixel structure with specified channel values.

Parameters
[in]gray- initial value for blue, green and red channels. It is equal to 0 by default.
[in]a- initial value for alpha channel. It is equal to 255 by default.

◆ Bgra32() [2/4]

SIMD_INLINE Bgra32 ( const uint8_t &  b,
const uint8_t &  g,
const uint8_t &  r,
const uint8_t &  a = uint8_t(255) 
)

Creates a new 32-bit BGRA pixel structure with specified channel values.

Parameters
[in]b- initial value for blue channel.
[in]g- initial value for green channel.
[in]r- initial value for red channel.
[in]a- initial value for alpha channel. It is equal to 255 by default.

◆ Bgra32() [3/4]

SIMD_INLINE Bgra32 ( const Bgr24 p,
const uint8_t &  a = uint8_t(255) 
)

Creates a new 32-bit BGRA pixel structure on the base of 32-bit BGR pixel.

Parameters
[in]p- 32-bit BGR pixel.
[in]a- initial value for alpha channel. It is equal to 255 by default.

◆ Bgra32() [4/4]

SIMD_INLINE Bgra32 ( const Bgra32 p)

Creates a copy of 32-bit BGRA pixel structure.

Parameters
[in]p- 32-bit BGRA pixel.

Member Function Documentation

◆ At() [1/2]

template< template< class > class A > static const Bgr32 & At ( const View< A > &  view,
ptrdiff_t  col,
ptrdiff_t  row 
)
static

Gets constant reference to the pixel with specific coordinates at the image view.

Parameters
[in]view- an image view of 32-bit BGRA pixel format.
[in]col- x-coordinate of the pixel.
[in]row- y-coordinate of the pixel.
Returns
a constant reference to the pixel.

◆ At() [2/2]

template< template< class > class A > static Bgr32 & At ( View< A > &  view,
ptrdiff_t  col,
ptrdiff_t  row 
)
static

Gets reference to the pixel with specific coordinates at the image view.

Parameters
[in]view- an image view of 32-bit BGRA pixel format.
[in]col- x-coordinate of the pixel.
[in]row- y-coordinate of the pixel.
Returns
a reference to the pixel.