25 #include <fvutils/compression/jpeg_compressor.h> 26 #include <fvutils/compression/jpeg_compressor_libjpeg.h> 28 # include <fvutils/compression/jpeg_compressor_mmal.h> 31 #include <core/exception.h> 35 namespace firevision {
49 JpegImageCompressor::JpegImageCompressor(
unsigned int quality,
JpegColorspace jcs)
53 if (jcs != JPEG_CS_RGB) {
54 throw Exception(
"JpegImageCompressor MMAL can only encode to RGB colorspace");
59 throw Exception(
"No JPEG compressor implementation available.");
76 if (impl_type == JPEG_CI_MMAL) {
78 throw Exception(
"JpegImageCompressor MMAL not available at compile time");
80 if (jcs != JPEG_CS_RGB) {
81 throw Exception(
"JpegImageCompressor MMAL can only encode to RGB colorspace");
85 }
else if (impl_type == JPEG_CI_LIBJPEG) {
87 throw Exception(
"No JPEG compressor implementation available.");
92 throw Exception(
"JpegImageCompressor: requested unknown implementation");
97 JpegImageCompressor::~JpegImageCompressor()
JpegColorspace
JPEG color space.
Fawkes library namespace.
JpegCompressorImplementation
JPEG color space.
Base class for exceptions in Fawkes.