]> git.tdb.fi Git - libs/gui.git/blob - source/gbase/image.h
Add support for using libpng directly for PNG files
[libs/gui.git] / source / gbase / image.h
1 /* $Id$
2
3 This file is part of libmspgbase
4 Copyright © 2007-2009  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_GBASE_IMAGE_H_
9 #define MSP_GBASE_IMAGE_H_
10
11 #include <string>
12 #include "pixelformat.h"
13
14 namespace Msp {
15 namespace Graphics {
16
17 class Image
18 {
19 public:
20         struct Private;
21
22 private:
23         Private *priv;
24
25 public:
26         Image();
27         ~Image();
28
29         void load_file(const std::string &);
30         void load_memory(const void *, unsigned);
31         PixelFormat get_format() const;
32         unsigned get_width() const;
33         unsigned get_height() const;
34         const void *get_data() const;
35 };
36
37 } // namespace Graphics
38 } // namespace Msp
39
40 #endif