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
31namespace firevision {
32
33class JpegWriter : public Writer
34{
35public:
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
43private:
44 unsigned char *row_buffer;
45 int quality;
46
47 FILE *outfile;
48};
49
50} // end namespace firevision
51
52#endif
JPEG file writer.
Definition: jpeg.h:34
JpegWriter(int quality=80)
Constructor.
Definition: jpeg.cpp:49
virtual ~JpegWriter()
Destructor.
Definition: jpeg.cpp:70
virtual void write()
Write to file.
Definition: jpeg.cpp:85
virtual void set_buffer(colorspace_t cspace, unsigned char *buffer)
Set image buffer.
Definition: jpeg.cpp:75
Interface to write images.
Definition: writer.h:32
colorspace_t cspace
The colorspace of the image.
Definition: writer.h:52
unsigned char * buffer
The image-buffer.
Definition: writer.h:54
char * filename
The complete filename.
Definition: writer.h:45