Gorgon Game Engine
JPEG Class Reference

Public Member Functions

 JPEG ()
 
void Decode (Byte *input, std::size_t size, Containers::Image &output)
 Decodes given JPG data from the given input and creates the image. More...
 
void Decode (const std::string &input, Containers::Image &output)
 Decodes given JPG data from the given input and creates the image. More...
 
void Decode (std::istream &input, Containers::Image &output)
 Decodes given JPG data from the given input and creates the image. More...
 
void Decode (std::vector< Byte > &input, Containers::Image &output)
 Decodes given JPG data from the given input and creates the image. More...
 
void Encode (Containers::Image &input, const std::string &output, int quality=90)
 Encode given image to JPG compressed data. More...
 
void Encode (Containers::Image &input, std::ostream &output, int quality=90)
 Encode given image to JPG compressed data. More...
 
void Encode (Containers::Image &input, std::vector< Byte > &output, int quality=90)
 Encode given image to JPG compressed data. More...
 

Protected Member Functions

void decode (jpg::Reader &reader, Containers::Image &output)
 
void encode (jpg::Writer &writer, Containers::Image &input, int quality)
 

Constructor & Destructor Documentation

◆ JPEG()

JPEG ( )

Member Function Documentation

◆ Decode() [1/4]

void Decode ( Byte input,
std::size_t  size,
Containers::Image output 
)

Decodes given JPG data from the given input and creates the image.

throws runtime error

References JPEG::decode().

◆ Decode() [2/4]

void Decode ( const std::string &  input,
Containers::Image output 
)

Decodes given JPG data from the given input and creates the image.

throws runtime error

References JPEG::Decode().

◆ decode()

◆ Decode() [3/4]

void Decode ( std::istream &  input,
Containers::Image output 
)

Decodes given JPG data from the given input and creates the image.

throws runtime error

References JPEG::decode().

◆ Decode() [4/4]

void Decode ( std::vector< Byte > &  input,
Containers::Image output 
)

Decodes given JPG data from the given input and creates the image.

throws runtime error

References JPEG::decode().

◆ Encode() [1/3]

void Encode ( Containers::Image input,
const std::string &  output,
int  quality = 90 
)

Encode given image to JPG compressed data.

Quality is in percents 100 means best. throws runtime error

References JPEG::Encode().

◆ Encode() [2/3]

void Encode ( Containers::Image input,
std::ostream &  output,
int  quality = 90 
)

Encode given image to JPG compressed data.

Quality is in percents 100 means best. throws runtime error

References JPEG::encode().

◆ Encode() [3/3]

void Encode ( Containers::Image input,
std::vector< Byte > &  output,
int  quality = 90 
)

Encode given image to JPG compressed data.

Quality is in percents 100 means best. throws runtime error

References JPEG::encode().

◆ encode()


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