Life is about facing new challenges - Kostya Tszyu
Hi Pythonistas, a new week, a new 'bite' of Python coding. Let's shift gears a little bit: this week we have you choose an image manipulation task using Pillow, "the friendly PIL (Python Imaging Library) fork". Have fun!
Create a new virtual env,
pip install Pillow and use the module for one of the following tasks:
Create a tool to create thumbnails of a set of images.
Use Instagram like filters on a bunch of images.
Make promo banners for your brand or cause using Pillow: basically put your logo, a nice background and text on a canvas and save to file. Example made with Gimp, what about generating something similar with Pillow?
Similar as last one: make a birthday ecard generator.
Add a watermark to an image.
Feel free to do something else if that inspires you more, as long as you use Pillow!
Wrap the utility up in a little Flask app with interactive input/select boxes, for example:
Featured Image Creator was a PHP/JS/CSS project I (Bob) did some time ago. Maybe you can build something similar using Flask (JS) for user interaction and Pillow to generate the image upon form submit?
For a thumbnail generator you could have a (multi) image upload button which batch resizes them and shows them in the browser or generates a zipfile for download.
What about the (birthday) ecard generator: let the user choose between a set of images, enter a text and show the generated card in the browser with download link.
Etc ... combining user interaction (web app) and Pillow you can build some cool stuff. The possibilities are endless, surprise us ...
Deploy your solution to Heroku to show it to the world (and mention the URL in your PR).
This doc also provides you with instructions how you can submit your code to our community branch via a Pull Request (PR). We will feature your PRs in our end-of-the-week challenge review (previous editions).
Last but not least: there is no best solution, only learning more and better Python. Good luck!
Keep Calm and Code in Python!
-- Bob and Julian
Do you want to get 250+ concise and applicable Python tips in an ebook that will cost you less than 10 bucks (future updates included), check it out here.
"The discussions are succinct yet thorough enough to give you a solid grasp of the particular problem. I just wish I would have had this book when I started learning Python." - Daniel H
"Bob and Julian are the masters at aggregating these small snippets of code that can really make certain aspects of coding easier." - Jesse B
"This is now my favourite first Python go-to reference." - Anthony L
"Do you ever go on one of those cooking websites for a recipe and have to scroll for what feels like an eternity to get to the ingredients and the 4 steps the recipe actually takes? This is the opposite of that." - Sergio S