react-native-compressor icon indicating copy to clipboard operation
react-native-compressor copied to clipboard

InputType = 'base64' is failed

Open AntHuiZi opened this issue 1 year ago • 4 comments

Current behavior

example: const imageStr = data:image/png;base64,iVBORw0KGgoAAAANS== or 'iVBORw0KGgoAAAANS=='; const result = await Image.compress(imageStr, { input:'base64', maxWidth: 1500, maxHeight: 1500, quality: 0.8 }); console.log('result:', result); problem: I found that the result returned was empty.

Expected behavior

I hope to accept pictures with base64 characters and compress them

Platform

  • [✅] Android
  • [✅] iOS

React Native Version

"react-native": "0.74.1", "react": "18.2.0",

React Native Compressor Version

"react-native-compressor": "1.8.25",

Reproducible Steps And Demo

AntHuiZi avatar Jul 10 '24 02:07 AntHuiZi

👋 @AntHuiZi Thanks for opening your issue here! If you find this package useful hit the star🌟!

github-actions[bot] avatar Jul 10 '24 02:07 github-actions[bot]

same issue, even though i have set returnableOutputType and ouput, but no luck.

nil1603 avatar Oct 03 '24 12:10 nil1603

Same issue. Couldn't make it work.

mohammed-io avatar Oct 21 '24 19:10 mohammed-io

Same issue here.

Strapazzon avatar Apr 22 '25 12:04 Strapazzon