react-native-image-resizer/index.android.js
superAndrew af9f77d965 Add outputPath to options (#16)
* Add outputPath for android

* Add outputPath for ios

* Update readme

* Move outputPath to the end

* Update readme
2016-06-30 19:07:42 +02:00

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);
});
},
};