Commit d8ea109f authored by 少言's avatar 少言

0.1.4

parent 5841717f
......@@ -16,7 +16,7 @@
### 功能特点
* 支持 iOS、Android 两端
* 支持单选、多选,类型包括图片、GIF
* 支持单选、多选
* 可自定义裁剪区域大小,支持圆形裁剪
* 可设置压缩质量
* 支持返回图片 base64 编码
......
......@@ -259,7 +259,7 @@ public class RNSyanImagePickerModule extends ReactContextBaseJavaModule {
byte[] encode = Base64.encode(bytes,Base64.DEFAULT);
String encodeString = new String(encode);
return encodeString;
return "data:image/jpeg;base64," + encodeString;
}
/**
......
......@@ -274,7 +274,7 @@ RCT_EXPORT_METHOD(deleteCache) {
}
if ([self.cameraOptions sy_boolForKey:@"enableBase64"]) {
photo[@"base64"] = [imageData base64EncodedStringWithOptions:0];
photo[@"base64"] = [NSString stringWithFormat:@"data:image/jpeg;base64,%@", [imageData base64EncodedStringWithOptions:0]];
}
return photo;
}
......
{
"name": "react-native-syan-image-picker",
"version": "0.1.2",
"version": "0.1.4",
"description": "",
"main": "index.js",
"scripts": {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment