Take pic write a text and same it with the same text as filename

Hi to all,

I'm trying to create an app, that can take picture, write a text on it (simple no fuzzy lettering) and save it with the same text as name.
My Android is version 13. Can it be done. Should it be simple, right?

Thank you in advance
Kenneth

Set the taken image to a canvas, write text on the canvas, then save the canvas as an image

inspector02.aia (9.5 KB)


Hi Again,

This is my whole-day-long bad result ever. The image came out to be upside down, distorted with no text in it. It is also saved in a place that I don't want. This was another struggle, but at least the file is saved in my phone!

Please help, I'm out of ideas.

Thank you in advance
Kenneth

  1. Why did you set the canvas to 160w x 320h? No wonder the image is distorted...
  2. Take photos holding the phone in landscape mode to avoid image rotation (this is the easiest workaround)
  3. Where do you want the text, in a captioned area outside of the image ? (This will require more work, and possibly an extension) - mock up an example output...
  4. You have the paintColour set to none, hence no text will be displayed..., you should also align the text to left, not center.


Hi TIMAI2,
1.160x320 is relative to the original image. Just smaller! right?
2.I would like to take photos the portrait way
3.See the attached, at the bottom inside the pic (highlighted in yellow).
4. I'm very new to MIT APP INVENTOR, so I make stupid things.

Thanks

Try this:

inspector02revised.aia (19.5 KB)

This has been heavily revised, I added my image convertor extension to handle image rotation, and to get image dimensions. Saves to the ASD by default. Tested Android 13 with companion. Note the clock is used to overcome a glitch with the canvas. Assumes photos will be taken with the phone/device in portrait orientation. My phone takes a 300x400 image, yours will probably be similar. I have doubled the text so that it should display on all colour backgrounds in the image.

Thank you. Perfect.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.