On Mon, Nov 17, 2014 at 8:32 AM, Abdul Abdul <abdul.s...@gmail.com> wrote: > from PIL import Image > import os > > for inputfile in filelist > outputfile = os.path.splitext(inputfile)[0]+".jpg" > if inputfile != outputfile: > try: > Image.open(inputfile).save(outputfile) > except IOError: > print "unable to convert ", inputfile
The first issue I'm seeing here is that your indentation is messed up. I've no idea where your example is coming from, but somewhere between working code and what I'm seeing in front of me, some lines have become indented further than they should. You'll also need to figure out what the list of files should be. That's why you're seeing errors about 'filelist'. ChrisA -- https://mail.python.org/mailman/listinfo/python-list