malorisdead/GoddamnGallery — pull request #20 by lordastley (2014-09-15 21:01:37+00:00)
Title: Thumbnail update

Add configurable modes to thumbnailing; calling the function with the existing function signature now uses a builtin PIL function to generate a square thumbnail. There is now an additional proportional mode available; this uses the thumbnail function from the PIL.

Since PIL's thumbnail() modifies the existing PIL image directly, the other thumbnailing options have been updated to _also_ modify the existing image.

If I recall correctly, this has the side effect of speeding up average color determination, as the image being analysed is usually much smaller.