Make money with Oziconnect referral program

Food is one of the worst serial killers

better programming
Photo by Kyle Head on Unsplash

It was late spring and we were trying to finish all our projects before summer. When summer approaches, you know what to do. Throw a summer party.

I was in charge of table logistics. A party planner came up with the ingenious idea of ​​making the place cards photos of the guests. I was also told to create separate signs for food intolerances.

Some people are lactose intolerant, some are allergic to gluten, and some people die from eating shrimp.

Since I’m a Python geek, I wanted to see if I could combine the two. What if we created place cards with allergies already baked into them?

So I did just that.

Before and after photos showing the icon pasted above the profile photo
Image created by thispersondoesnotexist.com Profile photo without allergy icon and profile photo with allergy icon, screenshot by author |

Thankfully, I was able to get the best starting point anyone could want. The person who collected all the data and photos created a nice spreadsheet.

There were three columns — name, filename of the photo, and allergies. The example in this story is anonymous and the photo has been replaced with his AI-generated photo.

I started by sketching what the result would look like and writing some pseudo code. The actual code is likely to change considerably once you start programming, but it’s good to treat it as a sketch.

'''
fetch the spreadsheet entries:

- filenames
- allergies

We don't really care about the names because the photo is their way of seeing
where they are seated.

define a folder with the icons for the allergies.

calculate the size of the images. We want to make sure the watermark
ratio is the same so we get some consistency no matter the image size.

use pillow to overlay the images.
save new image with the filename plus a suffix

If no allergies,copy over the photos.

'''

The icons must be consistent across all place cards, so we need to calculate the percentage they cover. I would like to add it to the bottom right of the photo. (If you’re up for the challenge…

Make money with Oziconnect referral program
Make money with Oziconnect referral program
Make money with Oziconnect referral program
Make money with Oziconnect referral program
84512

About Us

We are a leading IT agency in Lagos, Nigeria, providing IT consulting and custom software development services. We offer a wide range of IT solutions across software development, web and mobile application development, blockchain development services, digital marketing, and branding.

Contact Us

25B Lagos-Abekouta Expressway Lagos

info@ozitechgroup.com

Phone: (234) 907 155 5545

@2023 OzitechGroup – All Right Reserved.