Commit d8ea109f authored by 少言's avatar 少言

0.1.4

parent 5841717f
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
### 功能特点 ### 功能特点
* 支持 iOS、Android 两端 * 支持 iOS、Android 两端
* 支持单选、多选,类型包括图片、GIF * 支持单选、多选
* 可自定义裁剪区域大小,支持圆形裁剪 * 可自定义裁剪区域大小,支持圆形裁剪
* 可设置压缩质量 * 可设置压缩质量
* 支持返回图片 base64 编码 * 支持返回图片 base64 编码
......
...@@ -259,7 +259,7 @@ public class RNSyanImagePickerModule extends ReactContextBaseJavaModule { ...@@ -259,7 +259,7 @@ public class RNSyanImagePickerModule extends ReactContextBaseJavaModule {
byte[] encode = Base64.encode(bytes,Base64.DEFAULT); byte[] encode = Base64.encode(bytes,Base64.DEFAULT);
String encodeString = new String(encode); String encodeString = new String(encode);
return encodeString; return "data:image/jpeg;base64," + encodeString;
} }
/** /**
......
...@@ -274,7 +274,7 @@ RCT_EXPORT_METHOD(deleteCache) { ...@@ -274,7 +274,7 @@ RCT_EXPORT_METHOD(deleteCache) {
} }
if ([self.cameraOptions sy_boolForKey:@"enableBase64"]) { if ([self.cameraOptions sy_boolForKey:@"enableBase64"]) {
photo[@"base64"] = [imageData base64EncodedStringWithOptions:0]; photo[@"base64"] = [NSString stringWithFormat:@"data:image/jpeg;base64,%@", [imageData base64EncodedStringWithOptions:0]];
} }
return photo; return photo;
} }
......
{ {
"name": "react-native-syan-image-picker", "name": "react-native-syan-image-picker",
"version": "0.1.2", "version": "0.1.4",
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "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