mirror of
https://github.com/status-im/react-native-image-resizer.git
synced 2025-01-11 23:24:30 +00:00
af9f77d965
* Add outputPath for android * Add outputPath for ios * Update readme * Move outputPath to the end * Update readme
13 lines
445 B
JavaScript
13 lines
445 B
JavaScript
import React from 'react-native';
|
|
|
|
const ImageResizerAndroid = React.NativeModules.ImageResizerAndroid;
|
|
|
|
export default {
|
|
createResizedImage: (imagePath, newWidth, newHeight, compressFormat, quality, rotation = 0, outputPath) => {
|
|
return new Promise((resolve, reject) => {
|
|
ImageResizerAndroid.createResizedImage(imagePath, newWidth, newHeight,
|
|
compressFormat, quality, rotation, outputPath, resolve, reject);
|
|
});
|
|
},
|
|
};
|