24-bit RGB pixel. More...
#include <SimdPixel.hpp>
Public Member Functions | |
Rgb24 (const uint8_t &gray=uint8_t(0)) | |
Rgb24 (const uint8_t &r, const uint8_t &g, const uint8_t &b) | |
Rgb24 (const Bgra32 &p) | |
Rgb24 (const Bgr24 &p) | |
Rgb24 (const Rgba32 &p) | |
Rgb24 (const Rgb24 &p) | |
Static Public Member Functions | |
template<template< class > class A> | |
static const Rgb24 & | At (const View< A > &view, ptrdiff_t col, ptrdiff_t row) |
template<template< class > class A> | |
static Rgb24 & | At (View< A > &view, ptrdiff_t col, ptrdiff_t row) |
Data Fields | |
uint8_t | red |
8-bit red channel 24-bit BGR pixel. | |
uint8_t | green |
8-bit green channel 24-bit BGR pixel. | |
uint8_t | blue |
8-bit blue channel 24-bit BGR pixel. | |
Detailed Description
24-bit RGB pixel.
Provides manipulation of 24-bit RGB (Red, Blue, Green) pixels of the View struct.
Constructor & Destructor Documentation
◆ Rgb24() [1/6]
SIMD_INLINE Rgb24 | ( | const uint8_t & | gray = uint8_t(0) | ) |
Creates a new 24-bit RGB pixel structure with specified channel values.
- Parameters
-
[in] gray - initial value for all channels. It is equal to 0 by default.
◆ Rgb24() [2/6]
SIMD_INLINE Rgb24 | ( | const uint8_t & | r, |
const uint8_t & | g, | ||
const uint8_t & | b | ||
) |
Creates a new 24-bit RGB 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.
◆ Rgb24() [3/6]
Creates a new 24-bit RGB pixel structure on the base of 32-bit BGRA pixel.
- Parameters
-
[in] p - 32-bit BGRA pixel.
◆ Rgb24() [4/6]
Creates a new 24-bit RGB pixel structure on the base of 24-bit BGR pixel.
- Parameters
-
[in] p - 24-bit BGR pixel.
◆ Rgb24() [5/6]
Creates a new 24-bit RGB pixel structure on the base of 32-bit RGBA pixel.
- Parameters
-
[in] p - 32-bit RGBA pixel.
◆ Rgb24() [6/6]
Creates a copy of 24-bit RGB pixel structure.
- Parameters
-
[in] p - 24-bit RGB pixel.
Member Function Documentation
◆ At() [1/2]
|
static |
Gets constant reference to the pixel with specific coordinates at the image view.
- Parameters
-
[in] view - an image view of 24-bit RGB 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]
|
static |
Gets reference to the pixel with specific coordinates at the image view.
- Parameters
-
[in] view - an image view of 24-bit RGB pixel format. [in] col - x-coordinate of the pixel. [in] row - y-coordinate of the pixel.
- Returns
- a reference to the pixel.