Simple Image Loading LibrarY  0.1.0
Public Member Functions | List of all members
Image Class Reference

Image is the main user class of the library. More...

#include <SILLYImage.h>

Public Member Functions

size_t getHeight () const
 Retrieve the height of the image.
 
const char * getLoaderIdentifierString () const
 Get Image loader identifier string.
 
PixelFormat getPixelFormat () const
 Retrieve the pixel format of the resulting image.
 
const bytegetPixelsDataPtr () const
 Get a pointer to the pixels data.
 
size_t getPixelsDataSize () const
 Get the size of the pixel buffer.
 
PixelFormat getSourcePixelFormat () const
 Retrieve the pixel format used for the image storage.
 
size_t getWidth () const
 Retrieve the width of the image.
 
 Image (DataSource &data)
 Constructor. More...
 
bool isValid () const
 Return true if the image is valid after its loading.
 
bool loadImageData (PixelFormat resultFormat=PF_RGBA, PixelOrigin origin=PO_TOP_LEFT)
 Load the image pixels in memory and store them in resultFormat. More...
 
bool loadImageHeader ()
 Retrieve the information concerning the image object. More...
 
 ~Image ()
 Destructor.
 

Detailed Description

Image is the main user class of the library.

Definition at line 46 of file SILLYImage.h.

Constructor & Destructor Documentation

◆ Image()

Image ( DataSource data)

Constructor.

Parameters
datathe raw input containing the image

Definition at line 48 of file SILLYImage.cpp.

Member Function Documentation

◆ loadImageData()

bool loadImageData ( PixelFormat  resultFormat = PF_RGBA,
PixelOrigin  origin = PO_TOP_LEFT 
)

Load the image pixels in memory and store them in resultFormat.

Parameters
resultFormatthe pixel format to be used for storing the result
originexpected origin position for the pixels
Returns
true on success false if an error occured
Note
this function can be called several time if the pixel format are different the format is reloaded

Definition at line 68 of file SILLYImage.cpp.

◆ loadImageHeader()

bool loadImageHeader ( )

Retrieve the information concerning the image object.

Returns
true on success

Definition at line 54 of file SILLYImage.cpp.


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