react-native-image-resizer icon indicating copy to clipboard operation
react-native-image-resizer copied to clipboard

Error resizing base64 image

Open passabilities opened this issue 8 years ago • 4 comments

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

passabilities avatar Feb 19 '17 00:02 passabilities

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

ChristianTucker avatar Feb 25 '17 19:02 ChristianTucker

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

passabilities avatar Feb 25 '17 20:02 passabilities

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

developercode1 avatar May 18 '18 09:05 developercode1

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

mickael-h avatar Mar 06 '19 16:03 mickael-h

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] avatar Sep 01 '22 19:09 stale[bot]

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

stale[bot] avatar Sep 09 '22 03:09 stale[bot]