Porytiles
|
Implementation of Png using the CImg image processing library. More...
#include <cimg_png.hpp>
Public Member Functions | |
CImgPng (const cimg_library::CImg< std::uint8_t > &image) | |
std::size_t | Width () const override |
Gets the width of this Png in pixels. | |
std::size_t | Height () const override |
Gets the height of this Png in pixels. | |
Rgba32 | At (std::size_t i) const override |
Fetches the Rgba32 color value at a given one-dimensional pixel index. | |
Rgba32 | At (std::size_t row, std::size_t col) const override |
Fetches the Rgba32 color value at a given row and column. | |
![]() | |
virtual | ~Png ()=default |
Implementation of Png using the CImg image processing library.
Definition at line 12 of file cimg_png.hpp.
|
explicit |
Definition at line 10 of file cimg_png.cpp.
|
overridevirtual |
Fetches the Rgba32 color value at a given one-dimensional pixel index.
The one-dimensional index assumes the Png as an array of pixels, where the length of the array is the Png's width times height.
i | The one-dimensional pixel index. |
Implements porytiles::Png.
Definition at line 25 of file cimg_png.cpp.
|
overridevirtual |
Fetches the Rgba32 color value at a given row and column.
row | The pixel row. |
col | The pixel column. |
Implements porytiles::Png.
Definition at line 29 of file cimg_png.cpp.
|
overridevirtual |
Gets the height of this Png in pixels.
Implements porytiles::Png.
Definition at line 21 of file cimg_png.cpp.
|
overridevirtual |
Gets the width of this Png in pixels.
Implements porytiles::Png.
Definition at line 17 of file cimg_png.cpp.