1 #ifndef AETHER_IMAGEDATA_HPP 2 #define AETHER_IMAGEDATA_HPP 4 #include "Aether/types/Colour.hpp" 18 std::vector<Colour> pixels_;
47 ImageData(
const std::vector<Colour> & pixels,
const size_t width,
const size_t height,
const uint8_t channels);
Colour * colourAt(const size_t x, const size_t y) const
Returns a pointer to the colour of a pixel at the given coordinate.
size_t height() const
Returns the height of the stored image in pixels.
ImageData()
The number of channels in the image (usually 3 or 4)
uint8_t channels() const
Returns the number of channels used within the stored image. This will usually return 3 (RGB) or 4 (R...
size_t width() const
Returns the width of the stored image in pixels.
Stores RGBA values representing a colour. Each component can be within the range 0 to 255 (inclusive)...
Definition: Colour.hpp:9
std::vector< Colour > toColourVector() const
Returns the stored image as a vector of colours.
Base namespace for all Aether related classes and functions.
Represents an object containing the raw pixel data for an image/texture as an array, along with required metadata such as width and height.
Definition: ImageData.hpp:16
bool valid() const
Returns whether the associated image is considered 'valid' (i.e. has some pixel data).
std::vector< uint8_t > toByteVector() const
Returns the stored image as a vector of bytes (i.e. one byte per channel). e.g. For an RGB image: [r0...