-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Displaying the captured image. #26
Comments
To display the base64 image (i.e. target: Camera.constants.CaptureTarget.memory) the code is roughly <Image
source={{
isStatic: true,
uri: 'data:image/jpeg;base64,'+base64image,
}}
style={{height: 100, width:100}}
/> where base64image is the string returned by the capture method. To display the <Image
source={{uri: imageURI, isStatic:true}}
style={{width: 100, height: 100}}
/> where imageURI is the string returned by the capture method. You will probably need to play with the width/height, and resizeMode prop to get everything the way you want it. |
That very helpful, thanks. |
Hi there, This does not seem to work any longer on React Native 0.44 for Android. How can I achieve this (displaying a temp, or disk, image)? |
@Mayzie - what doesn't work? do you have an error or a stack trace from logcat? |
Can confirm this no longer works. No problems on a simulator, but does not work on a real device |
No nevermind, after reinstalling it works as expected |
brilliant - thanks very much @rt2zz - saved me some head scratching.. |
So I'm to clear as to how we go about displaying the captured image from memory or from disk? Could give an example?
The text was updated successfully, but these errors were encountered: