The text will be 36 points high and white. It takes the photo your_photo.jpg and overlays the text your overlay text 40 pixels in from the left-hand edge and 728 pixels from the top edge. usr/bin/convert /path/to/your_photo.jpg -pointsize 36 -fill white -annotate +40+728 'your overlay text' /path/to/your_output_photo.jpg So What Does This Do? There are a couple of traps though because, from within a program, it’s better to specify the full path to files and programs. Sudo apt-get install imagemagick (install program) Overlaying Textįrom the command line, this is how it works…Ĭonvert your_photo.jpg -pointsize 36 -fill white -annotate +40+728 'your overlay text' your_output_photo.jpg Sudo apt-get update (update package list) It can all be done with an excellent package called ImageMagick. It didn’t take long to find a helpful thread. I had no idea how to overlay text on a photo, but I headed over to the Raspberry Pi forums and did a search. Whatever text you want to overlay, may come from a totally different place, so it wouldn’t be helpful for youīut I am going to cover the mechanics of doing the text and graphics overlay.I’m using the obsolete COSM pachube interface (it still works, but it’s not the way forward).I’m not going to cover the specifics of how I get the data from Xively because… Tweeted photo of garden with weather data and logos overlaid. It sounds hard, but it didn’t take long to find out how to do it.Īnd then I thought “What about overlaying a logo as well?” That didn’t take too long to work out either. So, I thought it would be cool if I could grab the weather station data from Xively and overlay that on a photo of the garden, along with time and date, and then tweet the photo. I have security cameras for this, but last summer I used a Pi camera as well. When away from the house, I like to monitor what’s happening. I have a weather station running on a Raspberry Pi. Let me backtrack and explain why I wanted to do this in the first place. ![]() Add things one step at a time and don’t move on to the next part until it works well, and you understand it. In this series, we’ve been building a Raspberry Pi Twitter app and we’re adding more to it. Today we’re going to take a photo, overlay some text and graphics on it and then tweet it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |