![]() |
Gorgon Game Engine
|
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) |
JPEG | ( | ) |
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().
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().
|
protected |
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().
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().
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().
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().
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().
|
protected |
References Writer::Attach(), basic_Image< T_ >::GetChannelsPerPixel(), basic_Image< T_ >::GetMode(), basic_Image< T_ >::GetSize(), Gorgon::Graphics::Grayscale, basic_Size< T_ >::Height, Gorgon::Encoding::my_error_exit(), basic_Image< T_ >::RawData(), Gorgon::Graphics::RGB, and basic_Size< T_ >::Width.