Fawkes API  Fawkes Development Version
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
jpeg.h
1 
2 /***************************************************************************
3  * jpeg_writer.h - JPEG writer
4  *
5  * Generated: Wed Jun 28 11:33:50 2006 (my brother's 18th birthday)
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_WRITERS_JPEG_H_
25 #define __FIREVISION_UTILS_WRITERS_JPEG_H_
26 
27 #include <fvutils/writers/writer.h>
28 
29 #include <cstdio>
30 
31 namespace firevision {
32 #if 0 /* just to make Emacs auto-indent happy */
33 }
34 #endif
35 
36 class JpegWriter : public Writer {
37 
38  public:
39  JpegWriter(int quality = 80);
40  JpegWriter(const char *filename, int quality = 80);
41  virtual ~JpegWriter();
42 
43  virtual void set_buffer(colorspace_t cspace, unsigned char *buffer);
44  virtual void write();
45 
46  private:
47  unsigned char *row_buffer;
48  int quality;
49 
50  FILE *outfile;
51 };
52 
53 } // end namespace firevision
54 
55 #endif