Tag Archives: Pillow

How to 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!

Adding a Border

The focus of this article will be on using the ImageOps module to add our borders. For this example, we will use this photo of a neat butterfly I took. Let’s write some code! Continue reading How to Add a Border to Your Photos with Python

How to Watermark Your Photos with Python

When you look up photos online, you will notice that some of them are watermarked. A watermark is usually some text or a logo overlaid on the photo that identifies who took the photo or who owns the rights to the photo. Some professionals recommend adding watermarks to your photos before sharing them on social media to prevent other people from using your photos as their own and profiting off your work. Of course, watermarking can be removed fairly easily, so this isn’t as useful as it used to be as a digital rights tool.

Anyway, the Pillow package provides the tools you need to add watermarks to your photos! The first thing you need to do is install Pillow if you haven’t already:

pip install pillow

Once that’s installed, we can continue! Continue reading How to Watermark Your Photos with Python