ScummVM API documentation
bmp.h
Go to the documentation of this file.
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
32 #ifndef IMAGE_BMP_H
33 #define IMAGE_BMP_H
34 
35 #include "common/scummsys.h"
36 #include "common/str.h"
37 #include "graphics/palette.h"
38 #include "image/image_decoder.h"
39 
40 namespace Common {
41 class SeekableReadStream;
42 class WriteStream;
43 }
44 
45 namespace Graphics {
46 struct Surface;
47 }
48 
49 namespace Image {
50 
67 class Codec;
68 
69 class BitmapDecoder : public ImageDecoder {
70 public:
71  BitmapDecoder();
72  virtual ~BitmapDecoder();
73 
74  // ImageDecoder API
75  void destroy() override;
76  virtual bool loadStream(Common::SeekableReadStream &stream) override;
77  const Graphics::Surface *getSurface() const override { return _surface; }
78  const Graphics::Palette &getPalette() const override { return _palette; }
79 
80 private:
81  Codec *_codec;
82  const Graphics::Surface *_surface;
83  Graphics::Palette _palette;
84 };
85 
89 bool writeBMP(Common::WriteStream &out, const Graphics::Surface &input, const byte *palette = nullptr);
91 } // End of namespace Image
92 
93 #endif
Definition: image_decoder.h:53
Definition: surface.h:67
Definition: stream.h:77
bool writeBMP(Common::WriteStream &out, const Graphics::Surface &input, const byte *palette=nullptr)
Definition: stream.h:745
Definition: codec.h:57
Definition: algorithm.h:29
Definition: formatinfo.h:28
const Graphics::Palette & getPalette() const override
Definition: bmp.h:78
const Graphics::Surface * getSurface() const override
Definition: bmp.h:77
Simple class for handling a palette data.
Definition: palette.h:55
Definition: movie_decoder.h:32
Definition: bmp.h:69