File tree Expand file tree Collapse file tree
java/com/reactnativeimagemanipulator Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ## 1.0.4
2+
3+ - Typescript module declarations improved and Pod Errors fixed.
4+
15## 1.0.3
26
37- Errors fixed.
Original file line number Diff line number Diff line change 2525
26261 . Open up ` android/app/src/main/java/[...]/MainActivity.java `
2727
28- - Add ` import com.reactnativeimagemanipulator .RNImageManipulatorPackage; ` to the imports at the top of the file
28+ - Add ` import com.oguzhnatly.rnimagemanipulator .RNImageManipulatorPackage; ` to the imports at the top of the file
2929- Add ` new RNImageManipulatorPackage() ` to the list returned by the ` getPackages() ` method
3030
31312 . Append the following lines to ` android/settings.gradle ` :
Original file line number Diff line number Diff line change 1-
2- <manifest xmlns : android =" http://schemas.android.com/apk/res/android"
3- package =" com.reactnativeimagemanipulator" >
4-
5- </manifest >
1+ <manifest xmlns : android =" http://schemas.android.com/apk/res/android" package =" com.oguzhnatly.rnimagemanipulator" ></manifest >
Original file line number Diff line number Diff line change 1- package com .reactnativeimagemanipulator ;
1+ package com .oguzhnatly . rnimagemanipulator ;
22
33import android .graphics .Bitmap ;
44import android .graphics .Matrix ;
Original file line number Diff line number Diff line change 11
2- package com .reactnativeimagemanipulator ;
2+ package com .oguzhnatly . rnimagemanipulator ;
33
44import java .util .Arrays ;
55import java .util .Collections ;
Original file line number Diff line number Diff line change 1- declare module '@oguzhnatly/react-native-image-manipulator' {
2- import React from 'react' ;
3- import RNImageManipulator from './index' ;
4-
5- export type ImageResult = {
6- uri : string ;
7- width : number ;
8- height : number ;
9- base64 ?: string ;
1+ import { RNImageManipulatorResult } from './index' ;
2+
3+ export declare type ImageResult = RNImageManipulatorResult ;
4+
5+ export declare function manipulate (
6+ uri : string ,
7+ actions : Array < {
8+ resize ?: { width ?: number ; height ?: number } ;
9+ rotate ?: number ;
10+ flip ?: { vertical ?: boolean ; horizontal ?: boolean } ;
11+ crop ?: {
12+ originX ?: number ;
13+ originY ?: number ;
14+ width ?: number ;
15+ height ?: number ;
1016 } ;
11-
12- export function manipulate (
13- uri : string ,
14- actions : Array < {
15- resize ?: { width ?: number ; height ?: number } ;
16- rotate ?: number ;
17- flip ?: { vertical ?: boolean ; horizontal ?: boolean } ;
18- crop ?: {
19- originX ?: number ;
20- originY ?: number ;
21- width ?: number ;
22- height ?: number ;
23- } ;
24- } > ,
25- saveOptions : {
26- compress ?: number ;
27- format ?: 'jpeg' | 'png' ;
28- base64 ?: boolean ;
29- } ,
30- callback : ( uri : string ) => void ,
31- ) : Promise < ImageResult > ;
32-
33- export default RNImageManipulator ;
34- }
35-
17+ } > ,
18+ saveOptions : {
19+ compress ?: number ;
20+ format ?: 'jpeg' | 'png' ;
21+ base64 ?: boolean ;
22+ } ,
23+ ) : Promise < RNImageManipulatorResult > ;
Original file line number Diff line number Diff line change @@ -2,4 +2,11 @@ import { NativeModules } from "react-native";
22
33const { RNImageManipulator } = NativeModules ;
44
5+ export type RNImageManipulatorResult = {
6+ uri : string ;
7+ width : number ;
8+ height : number ;
9+ base64 ?: string ;
10+ } ;
11+
512export default RNImageManipulator ;
You can’t perform that action at this time.
0 commit comments