Skip to content

Commit d95f7a2

Browse files
authored
Update README.md (#63)
* Update README.md Minor fix on angular documentation TS code. * Update README.md Fixed constant variable name img => image which is used later to show an example of converting to Base64. * Fixed typo mistake on variable name Added also a console log to show conversion of image to base64 string.
1 parent a61b2d0 commit d95f7a2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -142,17 +142,17 @@ export class DrawingPadExample {
142142

143143
// then get the drawing (Bitmap on Android) of the drawingpad
144144
let drawingImage;
145-
pad.getDrawing().then(
146-
data => {
145+
pad.getDrawing().then((data) => {
147146
console.log(data);
148147
// At this point you have a native image (Bitmap on Android or UIImage on iOS)
149148
// so lets convert to a NS Image using the ImageSource
150-
const img = new ImageSource(res); // this can be set as the `src` of an `Image` inside your NS
151-
drawingImage = img; // to set the src of an Image if needed.
149+
const image = new ImageSource(data); // this can be set as the `src` of an `Image` inside your NS
150+
drawingImage = image; // to set the src of an Image if needed.
152151
// now you might want a base64 version of the image
153152
const base64imageString = image.toBase64String('jpg'); // if you need it as base64
153+
console.log('::IMG_BASE64::', base64imageString);
154154
},
155-
err => {
155+
(err) => {
156156
console.log(err);
157157
}
158158
);

0 commit comments

Comments
 (0)