Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
react-native-syan-image-picker
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenSource
react-native-syan-image-picker
Commits
d8ea109f
Commit
d8ea109f
authored
Mar 30, 2018
by
少言
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0.1.4
parent
5841717f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
15 deletions
+15
-15
README.md
README.md
+1
-1
RNSyanImagePickerModule.java
...c/main/java/com/reactlibrary/RNSyanImagePickerModule.java
+2
-2
RNSyanImagePicker.m
ios/RNSyanImagePicker.m
+11
-11
package.json
package.json
+1
-1
No files found.
README.md
View file @
d8ea109f
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
### 功能特点
### 功能特点
*
支持 iOS、Android 两端
*
支持 iOS、Android 两端
*
支持单选、多选
,类型包括图片、GIF
*
支持单选、多选
*
可自定义裁剪区域大小,支持圆形裁剪
*
可自定义裁剪区域大小,支持圆形裁剪
*
可设置压缩质量
*
可设置压缩质量
*
支持返回图片 base64 编码
*
支持返回图片 base64 编码
...
...
android/src/main/java/com/reactlibrary/RNSyanImagePickerModule.java
View file @
d8ea109f
...
@@ -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
;
}
}
/**
/**
...
...
ios/RNSyanImagePicker.m
View file @
d8ea109f
...
@@ -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
;
}
}
...
...
package.json
View file @
d8ea109f
{
{
"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"
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment