Gathering detailed insights and metrics for @jarred/react-native-photo-manipulator
Gathering detailed insights and metrics for @jarred/react-native-photo-manipulator
Gathering detailed insights and metrics for @jarred/react-native-photo-manipulator
Gathering detailed insights and metrics for @jarred/react-native-photo-manipulator
React Native Image Processing API to edit photo programmatically for Android and iOS. It features print text, overlay on another image (add watermark), resize, crop, flip, rotate and optimize image size then convert file format to jpeg or png
npm install @jarred/react-native-photo-manipulator
Typescript
Module System
TypeScript (53.03%)
Objective-C (15.53%)
Kotlin (14.94%)
Java (4.33%)
Swift (3.8%)
Objective-C++ (3.64%)
JavaScript (2.45%)
Ruby (2.18%)
C (0.1%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
370 Stars
666 Commits
38 Forks
4 Watchers
12 Branches
3 Contributors
Updated on Jun 15, 2025
Latest Version
1.0.2
Package Id
@jarred/react-native-photo-manipulator@1.0.2
Unpacked Size
104.03 kB
Size
27.91 kB
File Count
96
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
2
28
Image processing library to edit photo programmatically in React Native
$ yarn add react-native-photo-manipulator
$ react-native link react-native-photo-manipulator
Libraries
➜ Add Files to [your project's name]
node_modules
➜ react-native-photo-manipulator
and add RNPhotoManipulator.xcodeproj
libRNPhotoManipulator.a
to your project's Build Phases
➜ Link Binary With Libraries
Cmd+R
)<android/app/src/main/java/[...]/MainActivity.java
import com.guhungry.rnphotomanipulator.RNPhotoManipulatorPackage;
to the imports at the top of the filenew RNPhotoManipulatorPackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':react-native-photo-manipulator'
project(':react-native-photo-manipulator').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-photo-manipulator/android')
android/app/build.gradle
:
implementation project(':react-native-photo-manipulator')
Import library with
1import RNPhotoManipulator from 'react-native-photo-manipulator';
Types:
Methods:
Image resource can be url or require()
Type | Description |
---|---|
number | Image from require('path/to/image') |
string | Image from url supports file://, http://, https:// and ftp:// |
Represent overlay image or print text operation
Overlay image batch operation
Property | Type | Description |
---|---|---|
operation | "overlay" | |
overlay | ImageSource | The overlay image |
position | Point | he position of overlay image in background image |
Print text batch operation
Property | Type | Description |
---|---|---|
operation | "text" | |
options | TextOptions | The text attributes |
Represent position (x, y) from top-left of image
Property | Type | Description |
---|---|---|
x | number | The x-axis coordinate from top-left |
y | number | The y-axis coordinate from top-left |
Represent area of region
Property | Type | Description |
---|---|---|
x | number | The x-axis coordinate from top-left |
y | number | The y-axis coordinate from top-left |
width | number | The width of the region |
height | number | The height of the region |
Represent size (width, height) of region or image
Property | Type | Description |
---|---|---|
width | number | The width of the region |
height | number | The height of the region |
Represent attributes of text such as text, color, size, and etc.
Property | Type | Description |
---|---|---|
position | Point | The position of the text in background image |
text | string | The value of the text |
textSize | number | The size of the text |
color | string | The color of the text |
thickness | number | The thickness (border width) of the region |
Crop image with cropRegion
and resize to targetSize
if specified
1static crop(image: ImageSource, cropRegion: Rect, targetSize?: Size) => Promise<string>
Parameter | Type | Required | Description |
---|---|---|---|
image | ImageSource | Yes | The image |
cropRegion | Rect | Yes | The region of image to be cropped |
targetSize | Size | No | The target size of result image |
Promise with image path in cache directory
1const image = "https://unsplash.com/photos/qw6qQQyYQpo/download?force=true"; 2const cropRegion = { x: 5, y: 30, size: 400, width: 250 }; 3const targetSize = { size: 200, width: 150 }; 4 5PhotoManipulator.crop(image, cropRegion, targetSize).then(path => { 6 console.log(`Result image path: ${path}`); 7});
Save result image
with specified quality
between 0 - 100
in jpeg format
1static optimize(image: ImageSource, quality: number) => Promise<string>
Parameter | Type | Required | Description |
---|---|---|---|
image | ImageSource | Yes | The image |
quality | number | Yes | The quality of result image between 0 - 100 |
Promise with image path in cache directory
1const image = "https://unsplash.com/photos/qw6qQQyYQpo/download?force=true"; 2const quality = 90; 3 4PhotoManipulator.optimize(image, 90).then(path => { 5 console.log(`Result image path: ${path}`); 6});
Overlay image on top of background image
1static overlayImage(image: ImageSource, overlay: ImageSource, position: Point) => Promise<string>
Parameter | Type | Required | Description |
---|---|---|---|
image | ImageSource | Yes | The background image |
overlay | ImageSource | Yes | The overlay image |
position | Point | Yes | The position of overlay image in background image |
Promise with image path in cache directory
1const image = "https://unsplash.com/photos/qw6qQQyYQpo/download?force=true"; 2const overlay = "https://www.iconfinder.com/icons/1174949/download/png/128"; 3const position = { x: 5, y: 20 }; 4 5PhotoManipulator.overlayImage(image, overlay, position).then(path => { 6 console.log(`Result image path: ${path}`); 7});
Print texts into image
1static printText(image: ImageSource, texts: TextOptions[]) => Promise<string>
Parameter | Type | Required | Description |
---|---|---|---|
image | ImageSource | Yes | The image |
texts | TextOptions[] | Yes | The list of text operations |
Promise with image path in cache directory
1const image = "https://unsplash.com/photos/qw6qQQyYQpo/download?force=true"; 2const texts = [ 3 { position: { x: 50, y: 30 }, text: "Text 1", textSize: 30, color: "#000000" }, 4 { position: { x: 50, y: 30 }, text: "Text 1", textSize: 30, color: "#FFFFFF", thickness: 3 } 5]; 6 7PhotoManipulator.printText(image, texts).then(path => { 8 console.log(`Result image path: ${path}`); 9});
Crop, resize and do operations (overlay and printText) on image
1static batch(image: ImageSource, operations: PhotoBatchOperations[], cropRegion: Rect, targetSize?: Size, quality?: number) => Promise<string>
Parameter | Type | Required | Description |
---|---|---|---|
image | ImageSource | Yes | The image |
operations | PhotoBatchOperations[] | Yes | The list of operations |
cropRegion | Rect | Yes | The region of image to be cropped |
targetSize | Size | No | The target size of result image |
quality | number | No | The quality of result image between 0 - 100 |
Promise with image path in cache directory
1const image = "https://unsplash.com/photos/qw6qQQyYQpo/download?force=true"; 2const cropRegion = { x: 5, y: 30, size: 400, width: 250 }; 3const targetSize = { size: 200, width: 150 }; 4const operations = [ 5 { operation: "text", options: { position: { x: 50, y: 30 }, text: "Text 1", textSize: 30, color: "#000000" } }, 6 { operation: "overlay", overlay: "https://www.iconfinder.com/icons/1174949/download/png/128", position: { x: 5, y: 20 } }, 7]; 8const quality = 90; 9 10PhotoManipulator.batch(image, cropRegion, targetSize, operations, quality).then(path => { 11 console.log(`Result image path: ${path}`); 12});
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
SAST tool is run on all commits
Details
Reason
binaries present in source code
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
7 existing vulnerabilities detected
Details
Reason
Found 2/16 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
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