SGCT master (487fac4)
Simple Graphics Cluster Toolkit
Loading...
Searching...
No Matches
sgct::Image Class Reference

#include <sgct/image.h>

Public Member Functions

 Image ()=default
 ~Image ()
void allocateOrResizeData ()
void load (const std::filesystem::path &filename)
void load (unsigned char *data, int length)
void save (const std::filesystem::path &filename)
 Save the buffer to file.
unsigned char * data ()
const unsigned char * data () const
int channels () const
int bytesPerChannel () const
ivec2 size () const
void setSize (ivec2 size)
void setChannels (int channels)
void setBytesPerChannel (int bpc)

Constructor & Destructor Documentation

◆ Image()

sgct::Image::Image ( )
default

◆ ~Image()

sgct::Image::~Image ( )

Member Function Documentation

◆ allocateOrResizeData()

void sgct::Image::allocateOrResizeData ( )

◆ bytesPerChannel()

int sgct::Image::bytesPerChannel ( ) const

◆ channels()

int sgct::Image::channels ( ) const

◆ data() [1/2]

unsigned char * sgct::Image::data ( )

◆ data() [2/2]

const unsigned char * sgct::Image::data ( ) const

◆ load() [1/2]

void sgct::Image::load ( const std::filesystem::path & filename)

◆ load() [2/2]

void sgct::Image::load ( unsigned char * data,
int length )

◆ save()

void sgct::Image::save ( const std::filesystem::path & filename)

Save the buffer to file.

Type is automatically set by filename suffix.

◆ setBytesPerChannel()

void sgct::Image::setBytesPerChannel ( int bpc)

◆ setChannels()

void sgct::Image::setChannels ( int channels)

◆ setSize()

void sgct::Image::setSize ( ivec2 size)

◆ size()

ivec2 sgct::Image::size ( ) const

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