scummvm/image/png.h

69 lines
1.8 KiB
C
Raw Normal View History

2011-04-16 14:08:33 +02:00
/* ScummVM - Graphic Adventure Engine
*
2011-04-16 14:08:33 +02:00
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
2014-04-05 18:18:42 +02:00
*
*/
2014-04-05 18:18:42 +02:00
/*
* PNG decoder used in engines:
* - sword25
2012-11-18 19:07:46 +01:00
* - wintermute
2014-04-05 18:18:42 +02:00
* Dependencies:
* - libpng
2012-04-17 15:07:08 +02:00
*/
2014-04-05 18:18:42 +02:00
#ifndef IMAGE_PNG_H
#define IMAGE_PNG_H
#include "common/scummsys.h"
2014-04-05 18:18:42 +02:00
#include "common/textconsole.h"
#include "image/image_decoder.h"
2014-04-05 18:18:42 +02:00
namespace Common {
2011-04-14 12:41:26 +02:00
class SeekableReadStream;
}
namespace Graphics {
2011-04-14 12:41:26 +02:00
struct Surface;
2014-04-05 18:18:42 +02:00
}
2011-04-14 12:41:26 +02:00
2014-04-05 18:18:42 +02:00
namespace Image {
class PNGDecoder : public ImageDecoder {
public:
2014-04-05 18:18:42 +02:00
PNGDecoder();
~PNGDecoder();
2012-03-25 11:41:48 +02:00
2014-04-05 18:18:42 +02:00
bool loadStream(Common::SeekableReadStream &stream);
2012-03-25 11:41:48 +02:00
void destroy();
2014-04-05 18:18:42 +02:00
const Graphics::Surface *getSurface() const { return _outputSurface; }
2012-05-03 05:51:15 +02:00
const byte *getPalette() const { return _palette; }
2012-07-06 22:05:21 +02:00
uint16 getPaletteColorCount() const { return _paletteColorCount; }
2012-03-25 11:41:48 +02:00
private:
2014-04-05 18:18:42 +02:00
Common::SeekableReadStream *_stream;
2012-03-25 11:41:48 +02:00
byte *_palette;
2012-07-06 22:05:21 +02:00
uint16 _paletteColorCount;
2014-04-05 18:18:42 +02:00
Graphics::Surface *_outputSurface;
};
2012-03-25 11:41:48 +02:00
2014-04-05 18:18:42 +02:00
} // End of namespace Image
#endif