image manipulation with python python

Lasted updated by @craigaddyman on 20 August 2015

So having recently got married, my Mrs wanted all the wedding photos turning into grey scale, I originally planned to do this with one at a time as I thought she only wanted a few doing - it turned out to be all of them and there are around 600 of them!

I took this as an opportunity to extend my python knowledge and I ended up with this...

from PIL import Image, ImageFilter
import glob

    for files in glob.glob('*.*'):
        im ='L')
        print files"grey_" + files)

This runs through all images in the directory the script is ran in and makes a grey scale version of each with the file name grey_original_file_name.jpg


Subscribe by email