How to add the "annotate" over the image?

Hello,
Using ionic 5, Take a photo or upload a photo from photo library [currently working]. I want to add a button/option to ‘annotate’ the photo and draw on top of it with various colour options

Can anyone please help me how can i implement this feature?

Hi @hupptechnologies

The way you would probably do this is by rendering the image in a canvas (or a canvas element above the image). Then let the user draw on the canvas. Finally, to save the annotated image, draw the image on the canvas with the annotations above it and generate the image data using the Canvas’s toDataURL API https://stackoverflow.com/questions/923885/capture-html-canvas-as-gif-jpg-png-pdf

There might also be a library you can use. I haven’t used this but it looks interesting: https://markerjs.com/