64MP photos crash ImagePicker

  1. SDK Version: 40
  2. Platforms(Android/iOS/web/all): Android
  3. ImagePicker

The Samsung Galaxy S21 phone has the feature of taking 64MP photos (9248x6936).

Upon taking a picture using this feature with ImagePicker.launchCameraAsync(options) or selecting one from the gallery with ImagePicker.launchImageLibraryAsync(options) all code execution stops, the app just freezes.

I’m using the Expo Go app to test my code.

Upon closer inspection, I can see that the problem lies within setting the base64 option to true.
Passing the result into ImageManipulator and resizing seems to fix the problem (I am able to get the base64 of the smaller image).

Hey @augustinasmk, thanks for following up with more information regarding the crash. Does the crash occur with only 64MP assets with base64 enabled or with other assets as well? If you could open a Github Issue with a repro case and as much details you can provide that would be much appreciated!

Cheers,
Adam

Hey, @adamjnav.

Upon an, even more, closer inspection I came to the realization that the result (with base64) is actually there. The problem: the base64 is simply too big for the console.log to print out so neither console.log(result) or console.log(result.base64) work.

The crash happens whilst using the Buffer | Node.js v15.12.0 Documentation library to form a byte array from the base64 string. It has nothing to do with ImagePicker.

1 Like

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