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.

Catalanga
  • 81
  • 1
  • 7
  • Try referring this link https://stackoverflow.com/questions/50632217/dart-flutter-converting-timestamp – Omkar C. Dec 11 '19 at 01:20
  • But getting the actual timestamp isn't the issue here. Maybe the title I chose is a bit miss leading? – Catalanga Dec 11 '19 at 02:09

1 Answers1

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.

Community
  • 1
  • 1
Catalanga
  • 81
  • 1
  • 7
  • 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 '21 at 05:47