Fawkes API  Fawkes Development Version
png.h
1 
2 /***************************************************************************
3  * png.h - PNG Reader
4  *
5  * Created: Thu Apr 03 12:55:36 2008
6  * Copyright 2005-2008 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_READERS_PNG_H_
25 #define _FIREVISION_UTILS_READERS_PNG_H_
26 
27 #include <fvutils/readers/reader.h>
28 
29 namespace firevision {
30 
31 class PNGReaderData;
32 
33 class PNGReader : public Reader
34 {
35 public:
36  PNGReader(const char *filename);
37  virtual ~PNGReader();
38 
39  virtual void set_buffer(unsigned char *yuv422planar_buffer);
40  virtual colorspace_t colorspace();
41  virtual unsigned int pixel_width();
42  virtual unsigned int pixel_height();
43  virtual void read();
44 
45 private:
46  PNGReaderData *setup_read(const char *filename);
47 
48  PNGReaderData *d_;
49  bool opened;
50  unsigned char *buffer;
51 };
52 
53 } // end namespace firevision
54 
55 #endif
firevision::PNGReader::PNGReader
PNGReader(const char *filename)
Constructor.
Definition: png.cpp:59
firevision::PNGReader::colorspace
virtual colorspace_t colorspace()
Get colorspace from the just read image.
Definition: png.cpp:184
firevision::PNGReader::pixel_height
virtual unsigned int pixel_height()
Get height of read image in pixels.
Definition: png.cpp:200
firevision::PNGReader::read
virtual void read()
Read data from file.
Definition: png.cpp:210
firevision::PNGReader
PNG file reader.
Definition: png.h:34
firevision::PNGReader::set_buffer
virtual void set_buffer(unsigned char *yuv422planar_buffer)
Set buffer that the read image should be written to.
Definition: png.cpp:178
firevision::PNGReader::~PNGReader
virtual ~PNGReader()
Destructor.
Definition: png.cpp:166
firevision::PNGReader::pixel_width
virtual unsigned int pixel_width()
Get width of read image in pixels.
Definition: png.cpp:190
firevision::Reader
Image reader interface.
Definition: reader.h:32