From 4ea281c750c5afcc68f2832bb42d98a1cbce6735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Wed, 16 Jul 2014 18:53:56 -0700 Subject: rename llmr => mbgl --- include/mbgl/util/image.hpp | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 include/mbgl/util/image.hpp (limited to 'include/mbgl/util/image.hpp') diff --git a/include/mbgl/util/image.hpp b/include/mbgl/util/image.hpp new file mode 100644 index 0000000000..dc8f6a8150 --- /dev/null +++ b/include/mbgl/util/image.hpp @@ -0,0 +1,36 @@ +#ifndef MBGL_UTIL_IMAGE +#define MBGL_UTIL_IMAGE + +#include +#include +#include + +namespace mbgl { +namespace util { + +std::string compress_png(int width, int height, void *rgba, bool flip = false); + + +class Image { +public: + Image(const std::string &img, bool flip = false); + ~Image(); + + inline const char *getData() const { return img; } + inline uint32_t getWidth() const { return width; } + inline uint32_t getHeight() const { return height; } + +private: + // loaded image dimensions + uint32_t width = 0, height = 0; + + // the raw image data + char *img = nullptr; + +}; + + +} +} + +#endif -- cgit v1.2.1