Simd Library Documentation.

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

32-bit RGBA pixel. More...

#include <SimdPixel.hpp>

Public Member Functions

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

Static Public Member Functions

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

Data Fields

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

Detailed Description

32-bit RGBA pixel.

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

Constructor & Destructor Documentation

◆ Rgba32() [1/6]

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

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

Parameters
[in]gray- initial value for all channels. It is equal to 0 by default.
[in]a- initial value for alpha channel. It is equal to 255 by default.

◆ Rgba32() [2/6]

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

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

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

◆ Rgba32() [3/6]

SIMD_INLINE Rgba32 ( const Bgra32 p)

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

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

◆ Rgba32() [4/6]

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

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

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

◆ Rgba32() [5/6]

SIMD_INLINE Rgba32 ( const Rgb24 p,
const uint8_t &  a = uint8_t(255) 
)

Creates a new of 32-bit RGBA pixel structure on the base of 24-bit RGB pixel.

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

◆ Rgba32() [6/6]

SIMD_INLINE Rgba32 ( const Rgba32 p)

Creates a copy of 32-bit RGBA pixel structure.

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

Member Function Documentation

◆ At() [1/2]

template< template< class > class A > static const Rgba32 & 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 RGBA 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 Rgba32 & 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 RGBA pixel format.
[in]col- x-coordinate of the pixel.
[in]row- y-coordinate of the pixel.
Returns
a reference to the pixel.