uexCamera360

图片编辑插件

小贴士:【因其SDK停止维护,已不对3.0插件进行更新维护】

1.1、说明

该插件封装了Camera360开放SDK 编辑图片的功能.

  • 注意camera360管理应用页面填写的包名与Bundle ID与打包服务器的想匹配;
1.2、开源源码

点击至插件详情页(插件测试用例与原生插件源码已经提供)

1.3、插件截图

2、API

2.1、方法
edit //编辑图片

uexCamera360.edit(params);

说明

编辑图片,图片名称统一为当前时间的毫秒数。 Android平台,开发者可设置编辑后的图片是否保存到相册或者自定义保存路径。 iOS平台必须设置编辑后图片的保存路径。回调方法cbEdit

参数

var params = {
    id:,
    imgSrcPath:,
    isSaveToGallery:,
    imgSavePath:
}

各字段含义如下:

名称 类型 是否必选 说明
id String 唯一标识符,与回调方法中的id对应
imgSrcPath String 要编辑的图片地址,不传或传空时,会打开系统图库,用户可选择一张照片编辑
isSaveToGallery Boolean 仅Android支持,是否保存到相册,默认为false。该值为true时,imgSavePath参数无效。若不传或传false时,imgSavePath必传。
imgSavePath String 编辑后的图片保存的文件夹目录

平台支持

Android 4.0+
iOS 6.1+

版本支持

Android 3.0.0+
iOS 3.0.0+

示例

        var params = {
            id:2,
            imgSrcPath:"",//要编辑的图片源地址,不传或传空时,打开系统图库
            isSaveToGallery:false,//编辑后的图片是否保存到相册
            imgSavePath:"wgt://"//编辑后的图片存储路径
        };
        var data = JSON.stringify(params);
        uexCamera360.edit(data);
setAPIKey //设置APIKey

uexCamera360.setAPIKey(params);

说明

  • 仅iOS首次调用有效,调用后将忽略config.xml中的配置的APIKey。
  • 此接口是为了解决iOS IDE打包时不支持config.xml配置的问题。
  • 请在调用edit之前调用此接口
  • Android不支持此接口

参数

var params = {
    setAPIKey:,

}

各字段含义如下:

名称 类型 是否必选 说明
APIKey String Camera360官网申请的APIKey

平台支持

iOS 6.1+

版本支持

iOS 3.0.0+

示例


        var params = {
            APIKey:"hk5qVtkovqMu/jiSM+pHuVCwOkiDn5PppbAr7hb05Of9Jcd4+SXVsDetWTQUE9P1gtGmTkjzaWu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Nw8iiCAt4BOJfwNYrJbrGzmWouO4I2fQdWzjaGSH8tZVv0xXkwwosh91vAuj42sDtyQgQVr4oikOIdmCAcG4J9VbMi4IFK9PFO970IpW6KIB8LjuJvJJ/51573yBvoS1qEyuUIggVMHJN+e2GFqNwsmMBg=="
        };
        var data = JSON.stringify(params);
        uexCamera360.setAPIKey(data);
2.2、回调方法
cbEdit //编辑图片的回调方法

uexCamera360.cbEdit(param);

说明

编辑图片的回调方法

参数

var param = {
    id:,
    errorCode:,
    saveFilePath:
}

各字段含义如下:

名称 类型 是否必选 说明
id String 唯一标识符,与edit方法中的id对应
errorCode Number 错误码,详见errorCode
saveFilePath String 编辑后图片的保存路径,只在errorCode为0时有效

平台支持

Android 4.0+
iOS 6.1+

版本支持

Android 3.0.0+
iOS 3.0.0+

示例

window.uexOnload=function(type){
    uexCamera360.cbEdit=function(info){
        alert(info);
    }
}

3、附录

errorCode
errorCode 描述
0 成功
-1 源图片路径错误
-2 相册路径异常
-3 获取图片路径失败
-4 用户取消
-5 图片没有变化
-6 输出图片路径错误

4、更新历史

iOS

API版本:uexCamera360-3.0.0

最近更新时间:2015-12-30

历史发布版本 更新内容
3.0.0 Camera360图片编辑插件
Android

API版本:uexCamera360-3.0.0

最近更新时间:2015-12-30

历史发布版本 更新内容
3.0.0 Camera360图片编辑插件
还需要帮助吗? 联系我们
最新更新 8th Jul 2021