v0.1.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Friends Pages
CGUL::Image Class Reference

A container capable of loading and manipulating RGBA images. More...

#include <Image.hpp>

Public Member Functions

 Image (const Image &copy)
 
 Image (ImageFormat format, UCoord32 size)
 
 Image (ImageFormat format, UCoord32 size, void *data)
 
bool CanLoad (const String &file) const
 
void Load (const String &file)
 
void Save (const String &file, const String &extension) const
 
void Setup (ImageFormat format, UCoord32 size, void *data)
 
Color GetPixel (UInt32 x, UInt32 y)
 
void SetPixel (UInt32 x, UInt32 y, Color pixel)
 
template<typename Type >
Type * GetData ()
 
template<typename Type >
const Type * GetData () const
 
template<typename Type >
void SetData (Type *data)
 
ImageFormat GetFormat () const
 
UCoord32 GetSize () const
 
UInt32 GetWidth () const
 
UInt32 GetHeight () const
 
Size GetPixelSize () const
 
Size GetDataSize () const
 
bool IsValid () const
 
void Free ()
 

Static Public Member Functions

static ImageAdjustBrightness (Image *img, Float32 amt)
 
static ImageGetNegative (Image *img)
 
static ImageGetGrayscale (Image *img)
 
static ImageSwapColors (Image *img, Color pre, Color post)
 
static ImageMix (Image *one, Image *two, UInt32 method=ImageMixMethods::AVERAGE)
 

Detailed Description

A container capable of loading and manipulating RGBA images.

Todo:
Rotation, scaling, mirroring.

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