Commit dea12273 authored by Piotr Bernad's avatar Piotr Bernad

Aviary 4.4.5

parents
Pipeline #14547 pending
Versions/Current/AviarySDK
\ No newline at end of file
Versions/Current/Headers
\ No newline at end of file
//
// AVYInAppPurchaseManager.h
// AviarySDK
//
// Copyright (c) 2013-2014 Aviary. All rights reserved.
//
#import "AVYPhotoEditorProduct.h"
@protocol AVYInAppPurchaseManager;
@protocol AVYInAppPurchaseManagerDelegate;
@protocol AVYInAppPurchaseManagerDelegate <NSObject>
@optional
/**
Deprecated.
If implemented by the photo editor's delegate, this method will be called
just before requesting information about products available through in-app
purchase via the StoreKit API. If you wish to provide a custom product identifier,
then this method should return the product identifier registered in iTunes
Connect for the provided product.
@param manager The in app purchase manager.
@param product The product for which to return the product identifier
registered in iTunes Connect.
@return The product identifier registered in iTunes Connect.
@see AVYPhotoEditorProduct
*/
- (NSString *)inAppPurchaseManager:(id<AVYInAppPurchaseManager>)manager productIdentifierForProduct:(AVYPhotoEditorProduct *)product DEPRECATED_ATTRIBUTE;
@end
/**
This protocol is implemented by the object returned by
[AVYPhotoEditorController inAppPurchaseManager]. You should call these
methods to activate and deactivate in-app purchase.
@see AVYPhotoEditorController (inAppPurchaseManager)
*/
@protocol AVYInAppPurchaseManager <NSObject>
/**
Deprecated.
A delegate for handling in-app purchase-related callbacks, including mapping
internal product identifiers to developer-provided identifiers registered in
iTunes Connect.
@see AVYInAppPurchaseManagerDelegate
*/
@property (nonatomic, weak) id<AVYInAppPurchaseManagerDelegate> delegate DEPRECATED_ATTRIBUTE;
/**
Indicates whether manager is observing transactions.
@return YES if the in-app purchase manager is observing transactions (in-app
purchase is enabled), NO otherwise.
*/
@property (nonatomic, assign, readonly, getter=isObservingTransactions) BOOL observingTransactions;
/**
Call this method to start observing transactions. After calling this method,
isObservingTransactions will return YES.
*/
- (void)startObservingTransactions;
/**
Call this method to stop observing transactions. After calling this method,
isObservingTransactions will return NO.
*/
- (void)stopObservingTransactions;
@end
\ No newline at end of file
//
// AVYOpenGLManager.h
// AviarySDK
//
// Copyright (c) 2013-2014 Aviary, Inc. All rights reserved.
//
/**
Aviary products process images using OpenGL when possible. Before this happens, some OpenGL must be loaded, which takes some time. This class
provides a few class methods to help control that loading and unloading behavior.
Developers may call beginOpenGLLoad to begin OpenGL loading before launching any Aviary products. This will reduce the already very fast load time
down to basically nothing.
Once OpenGL data is loaded, Aviary's default behavior is to retain that data for the lifetime of the app. This allows
Aviary products to provide the best user experience possible. The data is fairly small in size, and it resides in GPU memory, so you likely won't
see it in your profiler.
Should you have a need to release the OpenGL data, the requestOpenGLDataPurge method sets an internal flag that causes OpenGL data to be unloaded
when it is no longer needed. If for whatever reason you change your mind about the unload, cancelOpenGLDataPurgeRequest will cancel the request if
data has not already been unloaded.
Calls to requestOpenGLDataPurge only apply to the currently loaded OpenGL data, so if you wish to always purge, you would need to call
requestOpenGLDataPurge every time you use an Aviary product. In this case a better solution would be to set the editor.purgesGPUMemory customization
option to YES, which causes Open GL data to be purged whenever possible. This option defaults to NO in order to optimize Aviary performance.
*/
@interface AVYOpenGLManager : NSObject
/**
Sets whether to purge GPU memory when possible
*/
+ (void)setPurgeGPUMemoryWhenPossible:(BOOL)purgeGPUMemory;
/**
If necessary OpenGL data has not been loaded, this call begins the OpenGL load process.
*/
+ (void)beginOpenGLLoad;
/**
Sets a flag that tells the current OpenGL data to be unloaded when possible.
Calls to requestOpenGLDataPurge only apply to the currently loaded OpenGL data, so if you wish to always purge, you would need to call
requestOpenGLDataPurge every time you use an Aviary product. In this case a better solution would be to set the editor.purgesGPUMemory customization
option to YES, which causes Open GL data to be purged whenever possible. This option defaults to NO in order to optimize Aviary performance.
*/
+ (void)requestOpenGLDataPurge;
/**
If a call has been made to requestOpenGLDataPurge and OpenGL data has not yet been unloaded, this method causes the request to be cancelled.
*/
+ (void)cancelOpenGLDataPurgeRequest;
@end
\ No newline at end of file
//
// AVYPhotoEditorCompatibility.h
// Ace
//
// Created by Michael Vitrano on 12/4/14.
// Copyright (c) 2014 Aviary. All rights reserved.
//
#import "AVYPhotoEditorController.h"
@class AVYPhotoEditorCustomization, AVYOpenGLManager;
@compatibility_alias AFPhotoEditorController AVYPhotoEditorController;
@compatibility_alias AFPhotoEditorContext AVYPhotoEditorContext;
@compatibility_alias AFPhotoEditorSession AVYPhotoEditorSession;
@compatibility_alias AFPhotoEditorProduct AVYPhotoEditorProduct;
@compatibility_alias AFPhotoEditorCustomization AVYPhotoEditorCustomization;
@compatibility_alias AFOpenGLManager AVYOpenGLManager;
#define AVY_PREMIUM_ADDON_NAMESPACE_DEPRECATED_ATTRIBUTE DEPRECATED_MSG_ATTRIBUTE("The AFPhotoEditorPremiumAddOn has been depreciated. "\
"Please use AVYPhotoEditorPremiumAddOn.")
typedef AVYPhotoEditorPremiumAddOn AFPhotoEditorPremiumAddOn AVY_PREMIUM_ADDON_NAMESPACE_DEPRECATED_ATTRIBUTE;
AVY_PREMIUM_ADDON_NAMESPACE_DEPRECATED_ATTRIBUTE extern AFPhotoEditorPremiumAddOn const AFPhotoEditorPremiumAddOnNone;
AVY_PREMIUM_ADDON_NAMESPACE_DEPRECATED_ATTRIBUTE extern AFPhotoEditorPremiumAddOn const AFPhotoEditorPremiumAddOnHiRes;
AVY_PREMIUM_ADDON_NAMESPACE_DEPRECATED_ATTRIBUTE extern AFPhotoEditorPremiumAddOn const AFPhotoEditorPremiumAddOnWhiteLabel;
DEPRECATED_MSG_ATTRIBUTE("The AFPhotoEditorControllerDelegate has been depreciated. " \
"Please use AVYPhotoEditorControllerDelegate.")
@protocol AFPhotoEditorControllerDelegate <AVYPhotoEditorControllerDelegate> @end
DEPRECATED_MSG_ATTRIBUTE("The AFInAppPurchaseManager has been depreciated. " \
"Please use AVYInAppPurchaseManager.")
@protocol AFInAppPurchaseManager <AVYInAppPurchaseManager> @end
DEPRECATED_MSG_ATTRIBUTE("The AFInAppPurchaseManagerDelegate has been depreciated. " \
"Please use AVYInAppPurchaseManagerDelegate.")
@protocol AFInAppPurchaseManagerDelegate <AVYInAppPurchaseManagerDelegate> @end
extern NSString *const AFPhotoEditorSessionCancelledNotification DEPRECATED_ATTRIBUTE;
extern NSString *const kAFPhotoEditorEffectsIAPEnabledKey DEPRECATED_ATTRIBUTE;
NSString *const _kAFEnhance(void) DEPRECATED_MSG_ATTRIBUTE("kAFEnhance has been deprecated. Please use kAVYEnhance.");
#define kAFEnhance _kAFEnhance()
NSString *const _kAFEffects(void) DEPRECATED_MSG_ATTRIBUTE("kAFEffects has been deprecated. Please use kAVYEffects.");
#define kAFEffects _kAFEffects()
NSString *const _kAFStickers(void) DEPRECATED_MSG_ATTRIBUTE("kAFStickers has been deprecated. Please use kAVYStickers.");
#define kAFStickers _kAFStickers()
NSString *const _kAFOrientation(void) DEPRECATED_MSG_ATTRIBUTE("kAFOrientation has been deprecated. Please use kAVYOrientation.");
#define kAFOrientation _kAFOrientation()
NSString *const _kAFCrop(void) DEPRECATED_MSG_ATTRIBUTE("kAFCrop has been deprecated. Please use kAVYCrop.");
#define kAFCrop _kAFCrop()
NSString *const _kAFAdjustments(void) DEPRECATED_MSG_ATTRIBUTE("kAFAdjustments has been deprecated. Please use kAVYAdjustments.");
#define kAFAdjustments _kAFAdjustments()
NSString *const _kAFColorAdjust(void) DEPRECATED_MSG_ATTRIBUTE("kAFColorAdjust has been deprecated. Please use kAVYColorAdjust.");
#define kAFColorAdjust _kAFColorAdjust()
NSString *const _kAFLightingAdjust(void) DEPRECATED_MSG_ATTRIBUTE("kAFLightingAdjust has been deprecated. Please use kAVYLightingAdjust.");
#define kAFLightingAdjust _kAFLightingAdjust()
NSString *const _kAFSharpness(void) DEPRECATED_MSG_ATTRIBUTE("kAFSharpness has been deprecated. Please use kAVYSharpness.");
#define kAFSharpness _kAFSharpness()
NSString *const _kAFDraw(void) DEPRECATED_MSG_ATTRIBUTE("kAFDraw has been deprecated. Please use kAVYDraw.");
#define kAFDraw _kAFDraw()
NSString *const _kAFText(void) DEPRECATED_MSG_ATTRIBUTE("kAFText has been deprecated. Please use kAVYText.");
#define kAFText _kAFText()
NSString *const _kAFRedeye(void) DEPRECATED_MSG_ATTRIBUTE("kAFRedeye has been deprecated. Please use kAVYRedeye.");
#define kAFRedeye _kAFRedeye()
NSString *const _kAFWhiten(void) DEPRECATED_MSG_ATTRIBUTE("kAFWhiten has been deprecated. Please use kAVYWhiten.");
#define kAFWhiten _kAFWhiten()
NSString *const _kAFBlemish(void) DEPRECATED_MSG_ATTRIBUTE("kAFBlemish has been deprecated. Please use kAVYBlemish.");
#define kAFBlemish _kAFBlemish()
NSString *const _kAFBlur(void) DEPRECATED_MSG_ATTRIBUTE("kAFBlur has been deprecated. Please use kAVYBlur.");
#define kAFBlur _kAFBlur()
NSString *const _kAFMeme(void) DEPRECATED_MSG_ATTRIBUTE("kAFMeme has been deprecated. Please use kAVYMeme.");
#define kAFMeme _kAFMeme()
NSString *const _kAFFrames(void) DEPRECATED_MSG_ATTRIBUTE("kAFFrames has been deprecated. Please use kAVYFrames.");
#define kAFFrames _kAFFrames()
NSString *const _kAFFocus(void) DEPRECATED_MSG_ATTRIBUTE("kAFFocus has been deprecated. Please use kAVYFocus.");
#define kAFFocus _kAFFocus()
NSString *const _kAFSplash(void) DEPRECATED_MSG_ATTRIBUTE("kAFSplash has been deprecated. Please use kAVYSplash.");
#define kAFSplash _kAFSplash()
NSString *const _kAFLeftNavigationTitlePresetCancel(void) DEPRECATED_MSG_ATTRIBUTE("kAFLeftNavigationTitlePresetCancel has been deprecated. Please use kAVYLeftNavigationTitlePresetCancel.");
#define kAFLeftNavigationTitlePresetCancel _kAFLeftNavigationTitlePresetCancel()
NSString *const _kAFLeftNavigationTitlePresetBack(void) DEPRECATED_MSG_ATTRIBUTE("kAFLeftNavigationTitlePresetBack has been deprecated. Please use kAVYLeftNavigationTitlePresetBack.");
#define kAFLeftNavigationTitlePresetBack _kAFLeftNavigationTitlePresetBack()
NSString *const _kAFLeftNavigationTitlePresetExit(void) DEPRECATED_MSG_ATTRIBUTE("kAFLeftNavigationTitlePresetExit has been deprecated. Please use kAVYLeftNavigationTitlePresetExit.");
#define kAFLeftNavigationTitlePresetExit _kAFLeftNavigationTitlePresetExit()
NSString *const _kAFRightNavigationTitlePresetDone(void) DEPRECATED_MSG_ATTRIBUTE("kAFRightNavigationTitlePresetDone has been deprecated. Please use kAVYRightNavigationTitlePresetDone.");
#define kAFRightNavigationTitlePresetDone _kAFRightNavigationTitlePresetDone()
NSString *const _kAFRightNavigationTitlePresetSave(void) DEPRECATED_MSG_ATTRIBUTE("kAFRightNavigationTitlePresetSave has been deprecated. Please use kAVYRightNavigationTitlePresetSave.");
#define kAFRightNavigationTitlePresetSave _kAFRightNavigationTitlePresetSave()
NSString *const _kAFRightNavigationTitlePresetNext(void) DEPRECATED_MSG_ATTRIBUTE("kAFRightNavigationTitlePresetNext has been deprecated. Please use kAVYRightNavigationTitlePresetNext.");
#define kAFRightNavigationTitlePresetNext _kAFRightNavigationTitlePresetNext()
NSString *const _kAFRightNavigationTitlePresetSend(void) DEPRECATED_MSG_ATTRIBUTE("kAFRightNavigationTitlePresetSend has been deprecated. Please use kAVYRightNavigationTitlePresetSend.");
#define kAFRightNavigationTitlePresetSend _kAFRightNavigationTitlePresetSend()
NSString *const _kAFCropPresetName(void) DEPRECATED_MSG_ATTRIBUTE("kAFCropPresetName has been deprecated. Please use kAVYCropPresetName.");
#define kAFCropPresetName _kAFCropPresetName()
NSString *const _kAFCropPresetWidth(void) DEPRECATED_MSG_ATTRIBUTE("kAFCropPresetWidth has been deprecated. Please use kAVYCropPresetWidth.");
#define kAFCropPresetWidth _kAFCropPresetWidth()
NSString *const _kAFCropPresetHeight(void) DEPRECATED_MSG_ATTRIBUTE("kAFCropPresetHeight has been deprecated. Please use kAVYCropPresetHeight.");
#define kAFCropPresetHeight _kAFCropPresetHeight()
NSString *const _kAFProductEffectsGrunge(void) DEPRECATED_MSG_ATTRIBUTE("kAFProductEffectsGrunge is deprecated. Please use kAVYProductEffectsGrunge.");
#define kAFProductEffectsGrunge _kAFProductEffectsGrunge()
NSString *const _kAFProductEffectsNostalgia(void) DEPRECATED_MSG_ATTRIBUTE("kAFProductEffectsNostalgia is deprecated. Please use kAVYProductEffectsNostalgia.");
#define kAFProductEffectsNostalgia _kAFProductEffectsNostalgia()
NSString *const _kAFProductEffectsViewfinder(void) DEPRECATED_MSG_ATTRIBUTE("kAFProductEffectsViewfinder is deprecated. Please use kAVYProductEffectsViewfinder.");
#define kAFProductEffectsViewfinder _kAFProductEffectsViewfinder()
//
// AVYPhotoEditorContext.h
// AviarySDK
//
// Created by Cameron Spickert on 3/6/12.
// Copyright (c) 2012 Aviary, Inc. All rights reserved.
//
@class AVYPhotoEditorSession;
/**
Photo Editor Contexts are generated by calling the createContextWithImage: or createContextWithImage:maxSize: methods of AVYPhotoEditorSession.
A context encapsulates an input image and an output size. If not specified, the output size defaults to the image size. In the Basic SDK, the
output size is scaled down to a maximum of 3MP (if necessary, maintaining aspect ratio). There is no such limitation in the Premium SDK.
Calling render: on a context causes all modifications tracked in the AVYPhotoEditorSession (which tracks user generated photo-editing actions in
an AVYPhotoEditorController) to be replayed on the context's input image asynchronously. When rendering is complete, the completion block passed
into render: will be called with the finalized image, whose size will match the context's size. If the session contains no tracked actions (i.e., the user made
no edits before pressing "Done" or pressed "Cancel"), the result image will be `nil`. Note: render: may only be called once per context.
By default, contexts take advantage of GPU acceleration. If an input image is too large to be represented as an OpenGL texture, an attempt to render
an image will cause the context to silently fall back to CPU rendering. Maximum texture size is measured by the maximum dimension of an image, and
both the width and height of the input image must be less than this maximum dimension. iPhone 3GS, iPhone 4, and iPad 1 have a maximum texture
dimension of 2048 (4MP for a square image), while iPhone 5, iPhone 4S, iPad 2, and new iPads have a maximum texture dimension of 4096 (16MP for a square image).
Behavior varies between GPU and CPU rendering when a context is created before a session is closed. If the context is able to use the GPU, it will
wait until the session is closed before beginning to render the output image. This is because GPU processing is very fast for most user action sets, and
waiting until the session is closed to begin rendering saves memory and processing power. If the context falls back to using the CPU, it will render
actions on the image in the background as the user applies them in the SDK (by pressing the "Apply" button).
Some things to note about using contexts:
- We recommend choosing a maximum output resolution that suits the purposes of your application to provide the best experience for your users.
- Processing large images can consume a lot of memory and time. It may be necessary to free up resources and/or display an activity indicator
while a context is executing.
- To calculate the approximate maximum amount of memory a context could use, multiply the dimensions of the output size and multiply the result
by 4. For example, a context with a maximum output size of 1500x1500 will consume approximately 9mb of memory for the processing duration.
*/
@interface AVYPhotoEditorContext : NSObject
/// The session that the context was generated from.
@property (nonatomic, weak, readonly) AVYPhotoEditorSession *session;
/// The size that the context's image will be output at.
@property (nonatomic, assign, readonly) CGSize size;
/// Specifies if the context's rendering has been cancelled.
@property (nonatomic, assign, readonly, getter=isCanceled) BOOL canceled;
/// Specifies if the context's session has been modified.
@property (nonatomic, assign, readonly, getter=isModified) BOOL modified;
/**
The progress handler is called with an estimate of how far along in completing the render the context is. The handler is guaranteed to be
called on the main thread.
@param progressHandler The block to be called with progress updates.
*/
@property (nonatomic, copy) void(^progressHandler)(CGFloat);
/**
Specifies whether rendering has begun on the context.
If YES, any render: call will have no effect.
*/
@property (nonatomic, assign, readonly) BOOL hasBegunRendering;
/**
Replays all actions tracked by the generating AVYPhotoEditorSession on the context's image.
The completion block will not be called until after the `session` is closed, i.e. until the user has closed the AVYPhotoEditorController that generated the
`session`. If the user pressed "Cancel" or took no actions before pressing "Done", the `result` UImage in the completion block will be nil. Otherwise, it
will contain the rendered image. The context will try to render the image on the GPU, but it will fall back to the CPU if necessary. See the discussion in
AVYPhotoEditorContext for more details.
Note: This method may be called once per context, as it would not make sense to run the same actions on the same image twice. Check hasBegunRendering to
see if render has been called.
@param completion The block to be called when the image's render is complete.
@warning Calling this method from any thread other in the main thread may result in undefined behavior.
*/
- (void)render:(void (^)(UIImage *result))completion;
/**
Cancels the context's rendering.
@warning Calling this method from any thread other in the main thread may result in undefined behavior.
*/
- (void)cancelRendering;
@end
//
// AVYPhotoEditorViewController.h
// AviarySDK
//
// Copyright (c) 2014 Aviary. All rights reserved.
//
#import <UIKit/UIKit.h>
/**
Options for defining a set of premium add ons to enable.
*/
typedef NS_OPTIONS(NSUInteger, AVYPhotoEditorPremiumAddOn) {
/** The option indicating no premium add ons.*/
AVYPhotoEditorPremiumAddOnNone = 0,
/** The option indicating the high resolution premium add on.*/
AVYPhotoEditorPremiumAddOnHiRes = 1 << 0,
/** The option indicating the white labeling premium add on.*/
AVYPhotoEditorPremiumAddOnWhiteLabel = 1 << 1,
};
@class AVYPhotoEditorController;
@class AVYPhotoEditorSession;
@protocol AVYInAppPurchaseManager;
/**
Implement this protocol to be notified when the user is done using the editor.
You are responsible for dismissing the editor when you (and/or your user) are
finished with it.
*/
@protocol AVYPhotoEditorControllerDelegate <NSObject>
@optional
/**
Implement this method to be notified when the user presses the "Done" button.
The edited image is passed via the `image` parameter. The size of this image may
not be equivalent to the size of the input image, if the input image is larger
than the maximum image size supported by the SDK. Currently (as of 9/19/12), the
maximum size is {1024.0, 1024.0} pixels on all devices.
@param editor The photo editor controller.
@param image The edited image.
*/
- (void)photoEditor:(AVYPhotoEditorController *)editor finishedWithImage:(UIImage *)image;
/**
Implement this method to be notified when the user presses the "Cancel" button.
@param editor The photo editor controller.
*/
- (void)photoEditorCanceled:(AVYPhotoEditorController *)editor;
@end
/**
This class encapsulates the Aviary SDK's photo editor. Present this view controller to provide the user with a fast
and powerful image editor. Be sure that you don't forget to set the delegate property
to an object that conforms to the AVYPhotoEditorControllerDelegate protocol.
*/
@interface AVYPhotoEditorController : UIViewController
/**
Configures the SDK's API Key and Secret. You must provide these before instantiating an
instance of AVYPhotoEditorController. Not doing so will throw an exception. All API keys and secrets
are validated with Aviary's server. If the provided key and secret do not match the ones created for
your application, a UIAlertView will be displayed alerting you to the failed validation.
@param apiKey your app's API key
@param secret your app's secret
*/
+ (void)setAPIKey:(NSString *)apiKey secret:(NSString *)secret;
/**
Configures the Premium add-ons that SDK will use. By default there are no premium add-ons enabled.
The SDK will validate these add-ons on the server.
@param premiumAddOns bitmask of the add-ons to enable
*/
+ (void)setPremiumAddOns:(AVYPhotoEditorPremiumAddOn)premiumAddOns;
/**
Initialize the photo editor controller with an image.
@param image The image to edit.
*/
- (instancetype)initWithImage:(UIImage *)image;
/**
The photo editor's delegate.
*/
@property (nonatomic, weak) id<AVYPhotoEditorControllerDelegate> delegate;
/**
@return The SDK version number.
*/
+ (NSString *)versionString;
@end
@protocol AVYPhotoEditorRender;
/// The error domain associated with issues arising from the editor.
extern NSString *const AVYPhotoEditorErrorDomain;
/// Status codes for high resolution render errors
typedef NS_ENUM(NSInteger, AVYPhotoEditorHighResolutionErrorCode) {
/// Code indicating an unknown error occurred
AVYPhotoEditorHighResolutionErrorCodeUnknown = 0,
/// Code indicating the user cancelled the edit
AVYPhotoEditorHighResolutionErrorCodeUserCancelled,
/// Code indicating the user made no edits in the session
AVYPhotoEditorHighResolutionErrorCodeNoModifications,
/// Code indicating the render was cancelled by developer action
AVYPhotoEditorHighResolutionErrorCodeRenderCancelled
};
@interface AVYPhotoEditorController (HighResolutionOutput)
typedef void(^AVYPhotoEditorRenderCompletion)(UIImage *result, NSError *error);
/**
Replays all actions made in the generating AVYPhotoEditorController on the provided image.
The provided image will be resized to fit within the `maxSize` parameter provided before any edits
are performed.
The completion block will be called when the render has finished and the `result` parameter will
contain the edited image. If the user pressed "Cancel" or took no actions before pressing "Done",
the `result` UIImage in the completion block will be nil and the appropriate `error` parameter
will be provided. If the render is cancelled by developer action, then the completion block will
be called with a nil `result` parameter and the appropriate `error` parameter.
@param image The image to replay the edits on.
@param maxSize The size to resize the input image to before replaying edits on it.
@param completion The block to be called when the image's render is complete.
@warning Calling this method from any thread other in the main thread may result in undefined behavior.
*/
- (id<AVYPhotoEditorRender>)enqueueHighResolutionRenderWithImage:(UIImage *)image
maximumSize:(CGSize)maxSize
completion:(AVYPhotoEditorRenderCompletion)completion;
/**
Replays all actions made in the generating AVYPhotoEditorController on the provided image.
The completion block will be called when the render has finished and the `result` parameter will
contain the edited image. If the user pressed "Cancel" or took no actions before pressing "Done",
the `result` UIImage in the completion block will be nil and the appropriate `error` parameter