Fawkes API  Fawkes Development Version
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 
33 class JpegWriter : public Writer
34 {
35 public:
36  JpegWriter(int quality = 80);
37  JpegWriter(const char *filename, int quality = 80);
38  virtual ~JpegWriter();
39 
40  virtual void set_buffer(colorspace_t cspace, unsigned char *buffer);
41  virtual void write();
42 
43 private:
44  unsigned char *row_buffer;
45  int quality;
46 
47  FILE *outfile;
48 };
49 
50 } // end namespace firevision
51 
52 #endif
firevision::Writer::buffer
unsigned char * buffer
Definition: writer.h:63
firevision::Writer::cspace
colorspace_t cspace
Definition: writer.h:61
firevision::JpegWriter::set_buffer
virtual void set_buffer(colorspace_t cspace, unsigned char *buffer)
Set image buffer.
Definition: jpeg.cpp:74
firevision::JpegWriter::write
virtual void write()
Definition: jpeg.cpp:84
firevision::Writer::filename
char * filename
Definition: writer.h:54
firevision::JpegWriter::JpegWriter
JpegWriter(int quality=80)
Constructor.
Definition: jpeg.cpp:48
firevision::JpegWriter::~JpegWriter
virtual ~JpegWriter()
Destructor.
Definition: jpeg.cpp:69