Fawkes API  Fawkes Development Version
compressed.h
1 
2 /***************************************************************************
3  * compression_writer.h - Write image arbitrarily compressed with an
4  * ImageCompressor
5  *
6  * Generated: Sat Aug 12 13:31:52 2006
7  * Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
8  *
9  ****************************************************************************/
10 
11 /* This program is free software; you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation; either version 2 of the License, or
14  * (at your option) any later version. A runtime exception applies to
15  * this software (see LICENSE.GPL_WRE file mentioned below for details).
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Library General Public License for more details.
21  *
22  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
23  */
24 
25 #ifndef __FIREVISION_FVUTILS_WRITERS_COMPRESSED_H_
26 #define __FIREVISION_FVUTILS_WRITERS_COMPRESSED_H_
27 
28 #include <fvutils/writers/writer.h>
29 
30 namespace firevision {
31 #if 0 /* just to make Emacs auto-indent happy */
32 }
33 #endif
34 
35 class ImageCompressor;
36 
37 class CompressedImageWriter : public Writer {
38 
39  public:
41  virtual ~CompressedImageWriter();
42 
43  virtual void set_filename(const char *filename);
44  virtual void set_dimensions(unsigned int width, unsigned int height);
45  virtual void set_buffer(colorspace_t cspace, unsigned char *buffer);
46  virtual void write();
47 
48  virtual void set_image_compressor(ImageCompressor *ic);
49 
50  private:
51  ImageCompressor *image_compressor;
52 
53 };
54 
55 } // end namespace firevision
56 
57 #endif
virtual void set_dimensions(unsigned int width, unsigned int height)
Set dimensions of image in pixels.
Definition: compressed.cpp:83
virtual ~CompressedImageWriter()
Destructor.
Definition: compressed.cpp:64
virtual void set_buffer(colorspace_t cspace, unsigned char *buffer)
Set image buffer.
Definition: compressed.cpp:94
colorspace_t cspace
The colorspace of the image.
Definition: writer.h:55
Interface to write images.
Definition: writer.h:34
CompressedImageWriter(ImageCompressor *ic=NULL)
Constructor.
Definition: compressed.cpp:52
virtual void set_image_compressor(ImageCompressor *ic)
Set image compressor.
Definition: compressed.cpp:136
Writer for arbitrarily compressed images.
Definition: compressed.h:37
virtual void set_filename(const char *filename)
Set filename.
Definition: compressed.cpp:71
unsigned int width
The width of the image.
Definition: writer.h:52
unsigned char * buffer
The image-buffer.
Definition: writer.h:57
virtual void write()
Write to file.
Definition: compressed.cpp:105
Image compressor interface.
unsigned int height
The height of the image.
Definition: writer.h:53
char * filename
The complete filename.
Definition: writer.h:48