abi30_0_0.com.facebook.react.bridge.ReadableNativeMap cannot be cast to abi30_0_0.com.facebook.react.bridge.ReadableNativeArray


#1

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


#2

Hey @ryanjayford,

Can you throw your code into a Snack so we can try and debug it on our end?

Cheers,

Adam


#3

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


#4

Thanks you so much!


closed #5

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.