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