Installations
npm install @jp928/react-native-image-tools
Releases
Unable to fetch releases
Developer
jp928
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
8.4.0
NPM Version
5.6.0
Statistics
3 Stars
132 Commits
2 Watching
1 Branches
1 Contributors
Updated on 20 Jun 2024
Languages
Objective-C (48.77%)
Java (43.12%)
C# (6.72%)
Ruby (1.16%)
JavaScript (0.22%)
Total Downloads
Cumulative downloads
Total Downloads
1,293
Last day
0%
1
Compared to previous day
Last week
100%
8
Compared to previous week
Last month
300%
16
Compared to previous month
Last year
-42.3%
139
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
No dependencies detected.
react-native-image-tools
Install instructions here.
An example app is here.
API
RNImageTools.openEditor(options)
Opens the Adobe Image Editor. Returns a promise which when resolved contains a uri to the output image, or null if editing was cancelled.
options parameter:
name | description | default value | type |
---|---|---|---|
imageUri | the input image | n/a | string (see below) |
outputFormat | the image type, must correspond to the input image type (generating PNG from JPEG or vider-vesa is not supported) | JPEG | string (either 'JPEG' or 'PNG') |
quality | representing the JPEG compression % (Ignored for PNG) | 80 | integer (a value between 0 and 100) |
preserveMetadata (iOS only) | copies image metadata (exif tags) from the input image to the output image | true | boolean |
saveTo | determines where the output image will be saved | photos | string ('photos' or 'file') |
Supported imageUri
formats include:
- path e.g.
/foo/bar/image.jpeg
- file url e.g.
file:///foo/bar/image.jpeg
- url e.g.
http://foo.com/bar/image.jpeg
- asset-uri (iOS only) e.g.
assets-library://asset/asset.JPG?id=foo&EXT=JPG
- content-uri (android only) e.g.
content://media/external/images/foo/bar/JPEG
1 import RNImageTools from "react-native-image-tools"; 2 3 ... 4 5 try { 6 const uri = await RNImageTools.openEditor({ 7 imageUri, 8 outputFormat, 9 quality, 10 preserveMetadata, 11 saveTo 12 }); 13 } catch (e) { 14 console.warn("error", e); 15 }
RNImageTools.selectImage(options)
Opens the native image picker dialog. Returns a promise which when resolved returns an object containing the uri to the chosen image as well as some other useful information, or null if cancelled.
options parameter:
name | description | default value | type |
---|---|---|---|
title | optional title (android only) | n/a | string |
1 import RNImageTools from "react-native-image-tools"; 2 3 ... 4 5 try { 6 const uri = await RNImageTools.selectImage({title}); 7 } catch (e) { 8 console.warn("error", e); 9 }
RNImageTools.imageMetadata(imageUri)
Returns a promise which when resolved returns object containing the image metadata.
1 import RNImageTools from "react-native-image-tools"; 2 3 ... 4 5 try { 6 const metadata = await RNImageTools.imageMetadata(imageUri); 7 } catch (e) { 8 console.warn("error", e); 9 }
todo
- add removeMetadata method
- support file urls in imageData method
- customise the tool array https://github.com/CreativeSDK/phonegap-plugin-csdk-image-editor/blob/master/src/ios/CDVImageEditor.m#L49
- support more oof the underlying Adobe API...
No vulnerabilities found.
Reason
0 existing vulnerabilities detected
Reason
binaries present in source code
Details
- Warn: binary detected: android/libs/commons-imaging-1.0-20170209.001022-116.jar:1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
2.5
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More