Python PIL — Add a border to image

Scriptopia
Jan 14, 2023

--

Python script that will add a border to an existing image using the Python PIL library. Here we use the ‘ImageOps.expand()’ method which adds a border to the image given the border width in pixels and pixel fill colour.

Support us by subscribing to our YouTube channel for daily coding content.

https://scriptopia.co.uk/2023/01/14/python-pil-add-a-border-to-image/

--

--

Scriptopia

Programming - Projects - Source Code available for everything - Scriptopia.co.uk