Skip to content
This repository has been archived by the owner on Jul 27, 2019. It is now read-only.

Commit

Permalink
Adding details for options docs, and sample code for using the qualit…
Browse files Browse the repository at this point in the history
…y setting.
  • Loading branch information
ashryanbeats committed Aug 15, 2016
1 parent dfc6cc7 commit 5c070a3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,12 @@ var app = {
var imageUrl = "<YOUR_IMAGE_HERE>";
var options = {
outputType: CSDKImageEditor.OutputType.PNG,
outputType: CSDKImageEditor.OutputType.JPEG,
tools: [
CSDKImageEditor.ToolType.EFFECTS,
CSDKImageEditor.ToolType.CROP
]
],
quality: 50
};
/* 2.b) Launch the Image Editor */
Expand Down
6 changes: 3 additions & 3 deletions www/ImageEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,9 @@ var CSDKImageEditor = {

/**
* @typedef {Object} Options - An object for configuring Image Editor behavior.
* @property {CSDKImageEditor.OutputType} [outputType=Same as original image] - Forces a specific output type.
* @property {CSDKImageEditor.ToolType[]} [tools=All tools] - Sets the list of tools that are available to the user, in the order you provide them within the array.
* @property {number} [quality=100] - Sets the quality of the output of the image. Valid values are `1` to `100`, inclusive.
* @property {CSDKImageEditor.OutputType} [outputType=Same as original image] - Forces a specific output type. Ex: `CSDKImageEditor.OutputType.JPEG`.
* @property {CSDKImageEditor.ToolType[]} [tools=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]`.
* @property {number} [quality=100] - Sets the quality of the output of the image. This setting only affects `OutputType.JPEG` images. Valid values are `1` to `100`, inclusive.
*/

module.exports = CSDKImageEditor;
6 changes: 3 additions & 3 deletions www/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ An object for configuring Image Editor behavior.

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| outputType | <code>[OutputType](#CSDKImageEditor.OutputType)</code> | <code>Same as original image</code> | Forces a specific output type. |
| tools | <code>[Array.&lt;ToolType&gt;](#CSDKImageEditor.ToolType)</code> | <code>All tools</code> | Sets the list of tools that are available to the user, in the order you provide them within the array. |
| quality | <code>number</code> | <code>100</code> | Sets the quality of the output of the image. Valid values are `1` to `100`, inclusive. |
| outputType | <code>[OutputType](#CSDKImageEditor.OutputType)</code> | <code>Same as original image</code> | Forces a specific output type. Ex: `CSDKImageEditor.OutputType.JPEG`. |
| tools | <code>[Array.&lt;ToolType&gt;](#CSDKImageEditor.ToolType)</code> | <code>All tools</code> | 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 | <code>number</code> | <code>100</code> | Sets the quality of the output of the image. This setting only affects `OutputType.JPEG` images. Valid values are `1` to `100`, inclusive. |

0 comments on commit 5c070a3

Please sign in to comment.