[英]How to compress an image to be small?
I would like to know how to compress an image from size 5 mb to just over 200kb using React Native.我想知道如何使用 React Native 将图像从 5 mb 压缩到 200kb 以上。
I have not tried any form yet, because I did not find anything of the type.我还没有尝试过任何形式,因为我没有找到任何类型的东西。
You can use the library react-native-image-crop-picker
and combine it to redux您可以使用库react-native-image-crop-picker
并将其组合到 redux
for example :例如 :
ImagePicker.openPicker({
width: 300, // set your values
height: 400,
cropping: true //if you want enable to crop or not
}).then(image => {
console.log(image);
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.