24 #ifndef __FIREVISION_UTILS_COMPRESSION_JPEG_COMPRESSOR_H_ 25 #define __FIREVISION_UTILS_COMPRESSION_JPEG_COMPRESSOR_H_ 27 #include <fvutils/compression/imagecompressor.h> 57 unsigned char *jpeg_buffer;
58 unsigned int jpeg_buffer_size;
59 unsigned char *buffer;
66 unsigned int jpeg_bytes;
JpegColorspace
JPEG color space.
CompressionDestination
Where to put the compressed image.
virtual void set_compression_destination(ImageCompressor::CompressionDestination cd)
Set compression destination.
virtual size_t recommended_compressed_buffer_size()
Get the recommended size for the compressed buffer.
virtual void set_destination_buffer(unsigned char *buf, unsigned int buf_size)
Set destination buffer (if compressing to memory).
virtual bool supports_compression_destination(ImageCompressor::CompressionDestination cd)
Check if compressor supports desired compression destination.
virtual void set_image_buffer(colorspace_t cspace, unsigned char *buffer)
Set image buffer to compress.
JpegImageCompressor(unsigned int quality=80, JpegColorspace jcs=JPEG_CS_RGB)
Constructor.
virtual void set_image_dimensions(unsigned int width, unsigned int height)
Set dimensions of image to compress.
virtual size_t compressed_size()
Get compressed size.
virtual void compress()
Compress image.
virtual ~JpegImageCompressor()
Destructor.
Image compressor interface.
virtual void set_filename(const char *filename)
Set file name.