Porytiles
|
An image in PNG format. More...
#include <png.hpp>
Public Member Functions | |
virtual | ~Png ()=default |
virtual std::size_t | Width () const =0 |
Gets the width of this Png in pixels. | |
virtual std::size_t | Height () const =0 |
Gets the height of this Png in pixels. | |
virtual Rgba32 | At (std::size_t i) const =0 |
Fetches the Rgba32 color value at a given one-dimensional pixel index. | |
virtual Rgba32 | At (std::size_t row, std::size_t col) const =0 |
Fetches the Rgba32 color value at a given row and column. | |
An image in PNG format.
Clients who need to operate on PNG images can use this interface to avoid dependencies on any particular PNG library. This interface provides a way for clients to read a PNG's metadata and manipulate its contents.
|
virtualdefault |
|
pure virtual |
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. |
Implemented in porytiles::CImgPng.
|
pure virtual |
Fetches the Rgba32 color value at a given row and column.
row | The pixel row. |
col | The pixel column. |
Implemented in porytiles::CImgPng.
|
pure virtual |
Gets the height of this Png in pixels.
Implemented in porytiles::CImgPng.
|
pure virtual |
Gets the width of this Png in pixels.
Implemented in porytiles::CImgPng.