38#ifndef DOXYGEN_SHOULD_SKIP_THIS
281 std::vector<uint8_t> m_pixels;
285#ifndef DOXYGEN_SHOULD_SKIP_THIS
Class for loading, manipulating and saving images.
Definition: Image.h:81
Image(Image &&)=default
Default move constructor.
void createMaskFromColor(const Color4u &color, uint8_t alpha=0)
Create a transparency mask from a specified color-key.
Image(Vector2i size, Color4u color)
Create the image and fill it with a unique color.
Image subImage(const RectI &area) const
Create a sub-image of the image from a defined area.
Image()
Default constructor.
void flipHorizontally()
Flip the pixels horizontally.
Image(Vector2i size)
Create the image.
Image & operator=(const Image &)=default
Default copy assignment.
Vector2i getSize() const
Return the size (width and height) of the image.
Image(const Path &filename)
Load the image from a file on disk.
Image(Vector2i size, const uint8_t *pixels, PixelFormat format=PixelFormat::Rgba32)
Create the image from an array of pixels.
Image(const Image &)=default
Default copy constructor.
void setPixel(Vector2i pos, const Color4u &color)
Change the color of a pixel.
Color4u getPixel(Vector2i pos) const
Get the color of a pixel.
Image(Vector2i size, Color3u color)
Create the image and fill it with a unique color.
bool saveToFile(const Path &filename) const
Save the image to a file on disk.
Image & operator=(Image &&)=default
Default move assignment.
const uint8_t * getPixelsPtr() const
Get a read-only pointer to the array of pixels.
Image(InputStream &stream)
Load the image from a custom stream.
Image(Span< const uint8_t > content)
Load the image from a file in memory.
PixelFormat
Pixel format.
Definition: Image.h:48
@ Rgba32
Four 8-bit channels.
Definition: Image.h:49
@ Rgb24
Three 8-bit channels.
Definition: Image.h:50
std::filesystem::path Path
A path in the filesystem.
Definition: Path.h:40
The namespace for gf classes.
A 3D vector.
Definition: Vector.h:570
A 4D vector.
Definition: Vector.h:852