Add a Border to Your Photos With Python

Sometimes it’s fun to add a simple border to your photos. The Pillow package has a very easy method of adding such borders to your images via its ImageOps module. As usual, you will need to have Pillow installed to do any of the examples in this article. If you don’t have it already, you can install it with pip:
pip install Pillow
Now that we’ve taken care of that bit of housekeeping, let’s learn how to add a border!