use CoreImage for decoding/encoding images on osx/ios

This commit is contained in:
Konstantin Käfer
2014-10-29 19:58:34 -04:00
parent 7a13db9a86
commit e3bc69b7e7
12 changed files with 181 additions and 29 deletions

View File

@@ -27,7 +27,7 @@ public:
void createContext();
void resize(uint16_t width, uint16_t height, float pixelRatio);
const std::unique_ptr<uint32_t[]> readPixels();
std::unique_ptr<uint32_t[]> readPixels();
void notify();
void notify_map_change(MapChange change, timestamp delay = 0);

View File

@@ -7,12 +7,12 @@
namespace mbgl {
namespace util {
std::string compress_png(int width, int height, void *rgba, bool flip = false);
std::string compress_png(int width, int height, void *rgba);
class Image {
public:
Image(const std::string &img, bool flip = false);
Image(const std::string &img);
inline const char *getData() const { return img.get(); }
inline uint32_t getWidth() const { return width; }