bamlab / react-native-image-resizer

🗻 Resize local images with React Native
MIT License
1.6k stars 344 forks source link

Error resizing base64 image #69

Closed passabilities closed 2 years ago

passabilities commented 7 years ago

image is defined and a valid base64 image data.

        ImageResizer.createResizedImage(`data:image/jpeg${image}`, 800, 600, 'JPEG', 80).then( uri => {
        }).catch( err => Alert.alert(JSON.stringify(err)))

When I run this, it retuns returns no useful information telling me what went wrong:

{"line":85298,"column":40,"sourceURL":"http://192.168.0.12:8081/imdex.ios.bundle?platform=ios&dev=true&hot=true"}

react-natvie: 0.24.1 react-native-image-resizer: 0.0.12

ChristianTucker commented 7 years ago

Try 'data:image/jpeg;base64,'+image

passabilities commented 7 years ago

I've tried that as well 😕 I believe the root issue is with #71

developercode1 commented 6 years ago

Did anyone find solution for this? I am facing this problem. The error says bad base-64 .

mickael-h commented 5 years ago

This works: 'data:image/jpeg,'+image The code expects a comma before the base64 image, for some reason...

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been automatically closed. Thank you for your contributions.