neuront/eirx — pull request #1 by iamantony (2014-07-15 17:04:55+00:00)
Title: Resize images in folders

I was looking for a simple app, that can resize images. And finally find yours simple python app. It's quite good, but it expect that in arguments it will get paths to the image files. Well, sometimes you need to re-size several images by one command.

So I decided to modify your code. Now in arguments to the app you can pass absolute paths to the folders with images (see *main.py, def convert()*):
SRC - absolute path to existing folder with images
DEST - absolute path to the folder for re-sized images

*Source* folder can contain different files (not only images), it's OK. Algorithm will choose only image files (well, if their format is supported by *imghdr* library). See *main.py, def get_images_paths()*.

Is *destination* folder don't exist, it will be created. Algorithm don't check if DEST folder contain image files with the same names as image files in SRC folder. If so, image files in DEST folder will be overwritten.

I also updated .gitignore file (just used this: https://github.com/github/gitignore/blob/master/Python.gitignore). Well, it is not necessarily to merge it)

Well, I guess that's all)