Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/27.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Expo ImageManipulator,大小调整后的图像存在问题_Javascript_Reactjs_React Native_Expo - Fatal编程技术网

Javascript Expo ImageManipulator,大小调整后的图像存在问题

Javascript Expo ImageManipulator,大小调整后的图像存在问题,javascript,reactjs,react-native,expo,Javascript,Reactjs,React Native,Expo,有人能给我一些建议,如何正确调整图像的大小。因为在将图像大小调整到600*600后,我得到的图像大小约为300kb,而来自Facebook或LinkedIn的具有相同分辨率的图像大小约为50-80kb。 我尝试在Expo ImageManipulator中使用压缩,但没有减少一个kb。 任何建议都很好,请提前感谢。 这是我的密码: const selectedImage = await ImageManipulator.manipulateAsync( result.uri,

有人能给我一些建议,如何正确调整图像的大小。因为在将图像大小调整到600*600后,我得到的图像大小约为300kb,而来自Facebook或LinkedIn的具有相同分辨率的图像大小约为50-80kb。 我尝试在Expo ImageManipulator中使用压缩,但没有减少一个kb。 任何建议都很好,请提前感谢。 这是我的密码:

 const selectedImage = await ImageManipulator.manipulateAsync(
    result.uri,
    [{ resize: { height: 600 } }],
    { compress: 0.7, format: ImageManipulator.SaveFormat.JPEG, base64: true }
  );