JNGL
Easy to use cross-platform 2D game library
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
ImageData Class Referenceabstract

Containing the pixel data of an image file. More...

#include <jngl/ImageData.hpp>

Public Member Functions

virtual int getWidth () const =0
 Returns the width of the image in pixels.
 
virtual int getHeight () const =0
 Returns the height of the image in pixels.
 
virtual const uint8_t * pixels () const =0
 RGBA values ordered row-major.
 

Static Public Member Functions

static std::unique_ptr< ImageDataload (const std::string &filename)
 Passing a filename will load the specified filename. More...
 

Detailed Description

Containing the pixel data of an image file.

Definition at line 14 of file ImageData.hpp.

Member Function Documentation

◆ load()

static std::unique_ptr< ImageData > load ( const std::string filename)
static

Passing a filename will load the specified filename.

PNG and WebP files are supported.


The documentation for this class was generated from the following file: