phonegap-plugin-csdk-image-editor icon indicating copy to clipboard operation
phonegap-plugin-csdk-image-editor copied to clipboard

Is there any way to fix the tools?

Open Netpolice opened this issue 8 years ago • 4 comments

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

Netpolice avatar Dec 22 '16 09:12 Netpolice

@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);

macdonst avatar Dec 22 '16 17:12 macdonst

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.

Netpolice avatar Dec 23 '16 00:12 Netpolice

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?

krish-dev avatar Jan 10 '17 15:01 krish-dev

@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 ?

pkudalkar7 avatar Nov 09 '17 11:11 pkudalkar7