diff options
Diffstat (limited to 'platform/darwin/include/mbgl/util/image+MGLAdditions.hpp')
-rw-r--r-- | platform/darwin/include/mbgl/util/image+MGLAdditions.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/platform/darwin/include/mbgl/util/image+MGLAdditions.hpp b/platform/darwin/include/mbgl/util/image+MGLAdditions.hpp new file mode 100644 index 0000000000..c5343af4de --- /dev/null +++ b/platform/darwin/include/mbgl/util/image+MGLAdditions.hpp @@ -0,0 +1,12 @@ +#pragma once + +#include <mbgl/util/image.hpp> + +#include <CoreGraphics/CGImage.h> + +// Creates a CGImage from a PremultipliedImage, taking over the memory ownership. +CGImageRef CGImageCreateWithMGLPremultipliedImage(mbgl::PremultipliedImage&&); + +// Creates a PremultipliedImage by copying the pixels of the CGImage. +// Does not alter the retain count of the supplied CGImage. +mbgl::PremultipliedImage MGLPremultipliedImageFromCGImage(CGImageRef); |