- CSDKImageEditor
A global object that lets you interact with the Creative SDK Image Editor.
- successCallback :
function
A callback to be used upon successful editing of an image.
- errorCallback :
function
A callback to handle errors when attempting to edit an image.
- Options :
Object
An object for configuring Image Editor behavior.
A global object that lets you interact with the Creative SDK Image Editor.
Kind: global variable
- CSDKImageEditor
- .OutputType :
enum
- .ToolType :
enum
- .OrientationType :
enum
- .LeftButtonType :
enum
- .RightButtonType :
enum
- .edit(successCallback, errorCallback, imageUrl, options)
- .OutputType :
Kind: static enum property of CSDKImageEditor
Read only: true
Properties
Name | Type | Default | Description |
---|---|---|---|
JPEG | number |
0 |
Return JPEG encoded image |
PNG | number |
1 |
Return PNG encoded image |
Kind: static enum property of CSDKImageEditor
Read only: true
Properties
Name | Type | Default |
---|---|---|
SHARPNESS | number |
0 |
EFFECTS | number |
1 |
REDEYE | number |
2 |
CROP | number |
3 |
WHITEN | number |
4 |
DRAW | number |
5 |
STICKERS | number |
6 |
TEXT | number |
7 |
BLEMISH | number |
8 |
MEME | number |
9 |
ORIENTATION | number |
10 |
ENHANCE | number |
11 |
FRAMES | number |
12 |
SPLASH | number |
13 |
FOCUS | number |
14 |
BLUR | number |
15 |
VIGNETTE | number |
16 |
LIGHTING | number |
17 |
COLOR | number |
18 |
OVERLAYS | number |
19 |
ADJUST | number |
20 |
Kind: static enum property of CSDKImageEditor
Read only: true
Properties
Name | Type | Default |
---|---|---|
PORTRAIT | number |
1 |
PORTRAIT_UPSIDE_DOWN | number |
2 |
LANDSCAPE_RIGHT | number |
3 |
LANDSCAPE_LEFT | number |
4 |
Kind: static enum property of CSDKImageEditor
Read only: true
Properties
Name | Type | Default |
---|---|---|
CANCEL | number |
0 |
BACK | number |
1 |
EXIT | number |
2 |
Kind: static enum property of CSDKImageEditor
Read only: true
Properties
Name | Type | Default |
---|---|---|
DONE | number |
0 |
SAVE | number |
1 |
NEXT | number |
2 |
SEND | number |
3 |
Launches the Image Editor.
Kind: static method of CSDKImageEditor
Param | Type | Description |
---|---|---|
successCallback | successCallback |
See type definition. |
errorCallback | errorCallback |
See type definition. |
imageUrl | string |
URL of the image to be edited. |
options | Options |
An object containing optional property/value pairs. |
A callback to be used upon successful editing of an image.
Kind: global typedef
Param | Type | Description |
---|---|---|
newUrl | string |
The URL of the new edited image. |
A callback to handle errors when attempting to edit an image.
Kind: global typedef
Param | Type | Description |
---|---|---|
error | Object |
Error object. |
An object for configuring Image Editor behavior.
Kind: global typedef
Properties
Name | Type | Default | Description |
---|---|---|---|
outputType | OutputType |
Same as original image |
Forces a specific output type. Ex: CSDKImageEditor.OutputType.JPEG . |
tools | Array.<ToolType> |
All tools |
Sets the list of tools that are available to the user, in the order you provide them within the array. Ex: [CSDKImageEditor.Tooltype.CROP] . |
quality | number |
100 |
Sets the quality of the output of the image. This setting only affects OutputType.JPEG images. Valid values are 1 to 100 , inclusive. |
confirmExit | boolean |
false |
[Android only] Sets whether or not to confirm exiting the image editor when the user clicks done. |
outputSize | number |
0 |
[Android only] Sets the size of the output image in mega pixels. Valid values are 0 to 30 , inclusive. Where 0 is the size of the preview image. |
saveWithNoChanges | boolean |
true |
[Android only] When true the success callback will be invoked even when the user does not make any changes to the image. If false the error callback will be invoked even when the user does not make any changes to the image. |
vibrate | boolean |
false |
[Android only] Whether or not to vibrate when certain tasks are performed. |
previewSize | number |
0 |
[Android only] Changes the size of the preview used in the editor. This is not the size of the output file, but only the size of the preview used during the edit. |
outputFile | string |
"''" |
[Android only] Path to save the file. If not specified the system default is used. |
crop.custom | boolean |
true |
[iOS only] Show custom option in crop tool |
crop.invert | boolean |
true |
[iOS only] Show invert option in crop tool |
crop.original | boolean |
true |
[iOS only] Show original option in crop tool |
crop.customArray | boolean |
[] |
[iOS only] An array of custom crop options. Each array element must be an object with three properties: label , width and height |
orientations | Array.<OrientationType> |
[CSDKImageEditor.OrientationType.PORTRAIT] |
[iOS only] Sets the list of orientations that are available to the user. Ex: [CSDKImageEditor.OrientationType.LANDSCAPE_LEFT, CSDKImageEditor.OrientationType.LANDSCAPE_RIGHT] . |
buttons.left | LeftButtonType |
CSDKImageEditor.LeftButtonType.CANCEL |
[iOS only] Label for the left button. Must be one of CSDKImageEditor.LeftButtonType. |
buttons.left | RightButtonType |
CSDKImageEditor.RightButtonType.APPLY |
[iOS only] Label for the right button. Must be one of CSDKImageEditor.RightButtonType. |