Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
imagecompressor.h
1 
2 /***************************************************************************
3  * imagecompressor.h - image compressor interface
4  *
5  * Generated: Fri Aug 11 18:53:19 2006 (on train to Cologne)
6  * Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef __FIREVISION_UTILS_COMPRESSION_IMAGE_COMPRESSOR_H_
25 #define __FIREVISION_UTILS_COMPRESSION_IMAGE_COMPRESSOR_H_
26 
27 #include <fvutils/color/colorspaces.h>
28 #include <sys/types.h>
29 
30 namespace firevision {
31 #if 0 /* just to make Emacs auto-indent happy */
32 }
33 #endif
34 
36  public:
37 
38  /** Where to put the compressed image */
40  COMP_DEST_FILE, /**< write compressed image to file */
41  COMP_DEST_MEM /**< write compressed image to buffer in memory */
42  };
43 
44  virtual ~ImageCompressor();
45 
46  virtual void set_image_dimensions(unsigned int width, unsigned int height) = 0;
47  virtual void set_image_buffer(colorspace_t cspace, unsigned char *buffer) = 0;
48  virtual void set_destination_buffer(unsigned char *buf, unsigned int buf_size) = 0;
49  virtual size_t compressed_size() = 0;
50  virtual void set_filename(const char *filename) = 0;
51  virtual void set_compression_destination(CompressionDestination cd) = 0;
52  virtual bool supports_compression_destination(CompressionDestination cd) = 0;
53  virtual size_t recommended_compressed_buffer_size() = 0;
54  virtual void compress() = 0;
55 
56 };
57 
58 } // end namespace firevision
59 
60 #endif
write compressed image to file
CompressionDestination
Where to put the compressed image.
Image compressor interface.