0

I'm currently building an android app that should be able to take photos. But I also want to add information to the image such as timestamp and location automatically (could be other information as well, always text).

I'm using Flutter to build this app, and using the camera package to open the camera and take pictures (code from flutter cookbook). But what I don't know if there's a way to add this information to the image using this package (for example the timestamp).

I guess that this could be achieved by post-processing the image before saving it. Is there any existent package to do that task? I've been through the image package but I'm not sure how sort it out.

2

1 Answer 1

1

After reading more carefully the image documentation I found these functions, that I think is exactly what I was looking for.

drawChar(Image dst, BitmapFont font, int x, int y, String string, {int color: 0xffffffff});

drawString(Image image, BitmapFont font, int x, int y, String string, {int color: 0xffffffff});

Both functions returns the modified image.

1
  • it works perfect but in android its taking time . for me complete process of taking image and stamping location and time ...took 4-5 seconds (android) but in iOS its taking max 700ms.
    – Rohit
    Sep 24, 2021 at 5:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.