1 #ifndef MSP_GRAPHICS_IMAGE_H_
2 #define MSP_GRAPHICS_IMAGE_H_
6 #include <msp/io/seekable.h>
7 #include "mspgui_api.h"
8 #include "pixelformat.h"
15 class MSPGUI_API Image
20 PixelFormat fmt = RGB;
24 char *owned_pixels = nullptr;
25 char *pixels = nullptr;
29 Data &operator=(const Data &);
37 void load_file(const std::string &);
38 void load_io(IO::Seekable &);
39 void load(ImageLoader &);
40 void load_into(ImageLoader &, void *);
41 void load_headers(ImageLoader &);
43 PixelFormat get_format() const { return data.fmt; }
44 unsigned get_width() const { return data.width; }
45 unsigned get_height() const { return data.height; }
46 unsigned get_stride() const { return data.stride; }
47 DEPRECATED const void *get_data() const { return data.pixels; }
48 const void *get_pixels() const { return data.pixels; }
51 } // namespace Graphics