|
The blo Library
|
Image. More...
#include <Image.h>
Classes | |
| class | RowProxy |
| Image row proxy. More... | |
Public Member Functions | |
| Image ()=default | |
| Default constructor. | |
| Image (int width, int height) | |
| Constructs image of specified size. | |
| Image (int width, int height, const T val[]) | |
| Constructs image of specified size and pixel value. | |
| Image (const T *pSrc, int srcStep, int width, int height) | |
| Constructs image that is a copy of specified image. | |
| Image (const Image &rhs) | |
| Copy constructor. | |
| Image (Image &&rhs) noexcept | |
| Move constructor. | |
| virtual | ~Image () |
| Destructor. | |
| Image & | operator= (const Image &rhs) |
| Copy assignment operator. | |
| Image & | operator= (Image &&rhs) noexcept |
| Move assignment operator. | |
| RowProxy | operator[] (int row) |
| Index image row. | |
| const RowProxy | operator[] (int row) const |
| Index image row. | |
| bool | empty () const |
| Tests if the image is empty. | |
| void | resize (int width, int height) |
| Resizes image. | |
| void | clear () |
| Resizes image to zero width and zero height. | |
| int | rows () const |
| Number of rows in the image. | |
| int | height () const |
| Height of the image. | |
| int | columns () const |
| Number of columns in the image. | |
| int | width () const |
| Width of the image. | |
| T * | ptrData () |
| Retrieves the pointer to the beginning of the image. | |
| const T * | ptrData () const |
| Retrieves the pointer to the beginning of the image. | |
| int | step () const |
| Step in bytes between the rows in the image. | |
| void | swap (Image &rhs) |
| Swaps this image with another one. | |
| void | set (const T val[]) |
| Sets image pixels to a value. | |
Static Public Member Functions | |
| static int | channels () |
| Number of channels in the image. | |
Image.
| T | Data type. |
| C | Number of channels. |
|
default |
Default constructor.
| blo::Image< T, C >::Image | ( | int | width, |
| int | height | ||
| ) |
Constructs image of specified size.
| width | Width of the image in pixels. |
| height | Height of the image in pixels. |
| blo::Image< T, C >::Image | ( | int | width, |
| int | height, | ||
| const T | val[] | ||
| ) |
Constructs image of specified size and pixel value.
| width | Width of the image in pixels. |
| height | Height of the image in pixels. |
| val | Constant value to assign to each pixel in the image. |
| blo::Image< T, C >::Image | ( | const T * | pSrc, |
| int | srcStep, | ||
| int | width, | ||
| int | height | ||
| ) |
Constructs image that is a copy of specified image.
| pSrc | Pointer to the source image. |
| srcStep | Step in bytes between the rows in the source image. |
| width | Width of the image in pixels. |
| height | Height of the image in pixels. |
| blo::Image< T, C >::Image | ( | const Image< T, C > & | rhs | ) |
Copy constructor.
|
noexcept |
Move constructor.
|
virtual |
Destructor.
|
static |
Number of channels in the image.
| void blo::Image< T, C >::clear | ( | ) |
Resizes image to zero width and zero height.
| int blo::Image< T, C >::columns | ( | ) | const |
Number of columns in the image.
| bool blo::Image< T, C >::empty | ( | ) | const |
Tests if the image is empty.
| int blo::Image< T, C >::height | ( | ) | const |
Height of the image.
| Image & blo::Image< T, C >::operator= | ( | const Image< T, C > & | rhs | ) |
Copy assignment operator.
|
noexcept |
Move assignment operator.
| RowProxy blo::Image< T, C >::operator[] | ( | int | row | ) |
Index image row.
| row | Row of the image. |
| const RowProxy blo::Image< T, C >::operator[] | ( | int | row | ) | const |
Index image row.
| row | Row of the image. |
| T * blo::Image< T, C >::ptrData | ( | ) |
Retrieves the pointer to the beginning of the image.
| const T * blo::Image< T, C >::ptrData | ( | ) | const |
Retrieves the pointer to the beginning of the image.
| void blo::Image< T, C >::resize | ( | int | width, |
| int | height | ||
| ) |
Resizes image.
| width | Width in pixels to resize image to. |
| height | Height in pixels to resize image to. |
| int blo::Image< T, C >::rows | ( | ) | const |
Number of rows in the image.
| void blo::Image< T, C >::set | ( | const T | val[] | ) |
Sets image pixels to a value.
| val | Constant value to assign to each pixel in the image. |
| int blo::Image< T, C >::step | ( | ) | const |
Step in bytes between the rows in the image.
| void blo::Image< T, C >::swap | ( | Image< T, C > & | rhs | ) |
Swaps this image with another one.
| int blo::Image< T, C >::width | ( | ) | const |
Width of the image.