26 #include <fvutils/compression/jpeg_compressor.h> 27 #include <fvutils/compression/jpeg_compressor_libjpeg.h> 29 # include <fvutils/compression/jpeg_compressor_mmal.h> 32 #include <core/exception.h> 53 JpegImageCompressor::JpegImageCompressor(
unsigned int quality,
JpegColorspace jcs)
57 if (jcs != JPEG_CS_RGB) {
58 throw Exception(
"JpegImageCompressor MMAL can only encode to RGB colorspace");
63 throw Exception(
"No JPEG compressor implementation available.");
80 if (impl_type == JPEG_CI_MMAL) {
82 throw Exception(
"JpegImageCompressor MMAL not available at compile time");
84 if (jcs != JPEG_CS_RGB) {
85 throw Exception(
"JpegImageCompressor MMAL can only encode to RGB colorspace");
89 }
else if (impl_type == JPEG_CI_LIBJPEG) {
91 throw Exception(
"No JPEG compressor implementation available.");
96 throw Exception(
"JpegImageCompressor: requested unknown implementation");
101 JpegImageCompressor::~JpegImageCompressor()
JpegColorspace
JPEG color space.
Fawkes library namespace.
JpegCompressorImplementation
JPEG color space.
Base class for exceptions in Fawkes.