如何为照片添加图像标记并将其保存在本机反应本地博览会中
async function takePicture(){
if(camRef){
const data = await camRef.current.takePictureAsync();
setCapturedPhoto(data.uri);
setOpen(true);
}
}
async function savePicture(){
const asset = await MediaLibrary.createAssetAsync(capturedPhoto)
.then(()=>{
lert('Salvo com sucesso!');
})
.catch(error => {
console.log('err', error);
})
}