X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgraphics%2Fimage.h;h=51147cefdcf341a882a426933efe52576721d155;hb=917c43de100807f4397e36b66b1a748dbf44370e;hp=6905461a49557ed64df428902e538d85a9d271fc;hpb=8e403dbbcde6efee1862f6d501ce30a3e7ba81c4;p=libs%2Fgui.git diff --git a/source/graphics/image.h b/source/graphics/image.h index 6905461..51147ce 100644 --- a/source/graphics/image.h +++ b/source/graphics/image.h @@ -19,9 +19,13 @@ public: PixelFormat fmt; unsigned width; unsigned height; - char *data; + unsigned stride; + char *owned_pixels; + char *pixels; Data(); + Data(const Data &); + Data &operator=(const Data &); ~Data(); }; @@ -32,11 +36,15 @@ public: void load_file(const std::string &); void load_io(IO::Seekable &); void load(ImageLoader &); + void load_into(ImageLoader &, void *); + void load_headers(ImageLoader &); PixelFormat get_format() const { return data.fmt; } unsigned get_width() const { return data.width; } unsigned get_height() const { return data.height; } - const void *get_data() const { return data.data; } + unsigned get_stride() const { return data.stride; } + DEPRECATED const void *get_data() const { return data.pixels; } + const void *get_pixels() const { return data.pixels; } }; } // namespace Graphics