expo-ble模块测试demo 增加图片缩放处理
This commit is contained in:
@@ -437,7 +437,10 @@ export const useBleExplorer = () => {
|
||||
|
||||
if (!isJpeg) {
|
||||
console.debug(`Converting image to JPEG...`);
|
||||
const context = ImageManipulator.ImageManipulator.manipulate(media.uri);
|
||||
const context = ImageManipulator.ImageManipulator.manipulate(media.uri).resize({
|
||||
width: BLE_UUIDS.SCREEN_SIZE,
|
||||
height: BLE_UUIDS.SCREEN_SIZE
|
||||
});
|
||||
const imageRef = await context.renderAsync();
|
||||
const result = await imageRef.saveAsync({
|
||||
compress: 1,
|
||||
|
||||
Reference in New Issue
Block a user