Just wanted to get my cache image, resize then convert to base64.
let result = await this.sketch.glView.takeSnapshotAsync(options);
//sample snapshot --> file:///data/user/0/host.exp.exponent/cache/ExperienceData/%2540v8solutions%252FJOMobile/GLView/b155a4e0-d0c7-4320-ad45-51e4cfe09503.png
const manipResult = await ImageManipulator.manipulate(
result.uri,
{ resize: {width: 200, height: 100} },
[{format: 'png'},{ base64: true }]
);
Did I miss something? Thanks in advance
Hey @ryanjayford ,
Can you throw your code into a Snack so we can try and debug it on our end?
Cheers,
Adam
Follow up @ryanjayford ,
Your arguments are incorrect for the ImageManipulator
API. The second argument needs to be an array of actions
and the third argument needs to be an object of saveOptions
.
https://docs.expo.io/versions/v30.0.0/sdk/imagemanipulator#expoimagemanipulatormanipulateuri-actions-saveoptions
system
Closed
November 8, 2018, 4:11am
5
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.