28 #include <CoreGraphics/CoreGraphics.h>
29 #include <CoreFoundation/CoreFoundation.h>
31 #if defined( __OBJC__ )
37 namespace cinder {
namespace cocoa {
49 operator UIImage*()
const {
if( mObj )
return mObj->first;
else return 0; }
52 static void destroy( std::pair<UIImage*,CGImageRef> *
data );
54 std::shared_ptr<std::pair<UIImage*,CGImageRef> > mObj;
SafeUiImage()
Definition: CinderCocoaTouch.h:46
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: GLee.h:1011
struct CGImage * CGImageRef
Definition: ImageSourceFileQuartz.h:30
SurfaceT< uint8_t > Surface8u
8-bit image
Definition: Surface.h:493
A class which encapsulate a UIImage and an associated CGImageRef in order to work around memory owner...
Definition: CinderCocoaTouch.h:44
std::shared_ptr< class ImageSource > ImageSourceRef
Definition: Channel.h:33
SafeUiImage createUiImage(const ImageSourceRef imageSource)
Definition: CinderCocoaTouch.mm:78
void writeToSavedPhotosAlbum(const ImageSourceRef imageSource)
Writes an image to the device's Photo Album.
Definition: CinderCocoaTouch.mm:91
Surface8u convertUiImage(UIImage *uiImage, bool assumeOwnership=false)
Converts a UIImage* into a cinder::Surface8u If assumeOwnership the result will increment the retain ...
Definition: CinderCocoaTouch.mm:43