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

Is there any way to fix the tools? #25

Open
Netpolice opened this issue Dec 22, 2016 · 4 comments
Open

Is there any way to fix the tools? #25

Netpolice opened this issue Dec 22, 2016 · 4 comments

Comments

@Netpolice
Copy link

Is there any way to fix the tools?

e.g.
Only allow crop in 4:3 ratio
Only allow adjust the brightness
Only allow draw a line

@macdonst
Copy link
Collaborator

@Netpolice yeah, you just have to pass in the options:

https://github.com/CreativeSDK/phonegap-plugin-csdk-image-editor/blob/master/docs/api.md

        var options = {
            outputType: CSDKImageEditor.OutputType.JPEG,
            tools: [
                // specify the tools you want
            ],
            crop: {
               // specify crop options
            },
            quality: 50
        };

        CSDKImageEditor.edit(success, error, imageUrl, options);

@Netpolice
Copy link
Author

crop: {
// specify crop options
},

If I would like to fix the crop ratio at 4:3, then how do I do?
I don't see there is tutorials in the document.

Thank you very much.

@krish-dev
Copy link

I have checked the source for customizing crop options.
its like.

@Property {boolean} [crop.custom=true] - [iOS only] Show custom option in crop tool

  • @Property {boolean} [crop.invert=true] - [iOS only] Show invert option in crop tool
  • @Property {boolean} [crop.original=true] - [iOS only] Show original option in crop tool
  • @Property {boolean} [crop.customArray=[]] - [iOS only] An array of custom crop options. Each array element must be an object with three properties: label, width and height

but it's only for iOS. then How it will works on Android?

@pkudalkar7
Copy link

@macdonst , can we use custom stickers?
var options = {
outputType: CSDKImageEditor.OutputType.JPEG,
tools: [
CSDKImageEditor.ToolType.ENHANCE,
CSDKImageEditor.ToolType.EFFECTS,
CSDKImageEditor.ToolType.ADJUST,
CSDKImageEditor.ToolType.STICKERS,
CSDKImageEditor.ToolType.Orientation,
CSDKImageEditor.ToolType.CROP,
CSDKImageEditor.ToolType.RESIZE,
CSDKImageEditor.ToolType.SHARPNESS,
CSDKImageEditor.ToolType.FOCUS,
CSDKImageEditor.ToolType.TEXT
],
STICKERS:{

               },
                 quality: 50
    };

Please help me how to add them , is it the right way above ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants