-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add custom text and image to photo #5
Comments
I think the text could be done using PIL. What specific platforms do you have in mind? I wasn't planning on adding any, but there should be Python bindings for most. |
I do not know PIL, but I'll have to look. I have a basic Raspberry PI B with the camera that I am rebuilding. I am going to follow the Nuts and Bolts article as a starting point then tweak as I go. I am going to have another box that has a running slideshow of all the photos so far, and add the non-proft logo to the corner. It is for a kids non-proft, so making it fun for them. |
I wonder if uploading to dropbox might be a good solution?
|
Might for a backup, I am planning on a shared folder. Unless you have a better idea. |
It would be a fine solution. I'm not sure when I'll get to play with adding the text and images, but feel free to ping me on it! |
Here's a working example of adding an image and text to an existing image using PIL. Any ideas for the interface to specify this? I'm thinking a key-value pair text file where you could specify the text, it's position, size, font and a logo image and it's position. If either is unpopulated it just ignores it. Also an option to save the originals or just save the images with overlays. from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
img = Image.open("sample_in.jpg")
draw = ImageDraw.Draw(img)
# font = ImageFont.truetype(<font-file>, <font-size>)
font = ImageFont.truetype("Xoxoxa.ttf", 26)
# draw.text((x, y),"Sample Text",(r,g,b))
draw.text((5, 5),"Leeman Wedding",(255,255,255),font=font)
draw.text((5, 30),"PiBooth",(255,255,255),font=font)
logo = Image.open("logo.jpeg")
img.paste(logo, (700, 300))
img.save('sample-out.jpg') |
I think config parse is a good solution: https://docs.python.org/3/library/configparser.html |
Howdy,
I am working on a similar project for a non-profit. My first go around with it I looped the photo thru FBI to add an image and text (Event name) to the photo before it was viewed and saved. Any thoughts on that?
Also any plans to add other social media feeds?
Looking forward to playing with this,
Phil
The text was updated successfully, but these errors were encountered: