[omaha] The Python PIL
mike at hostetlerhome.com
Wed May 21 19:12:02 CEST 2008
Sometimes Python just amazes me . . .
I exported a bunch of
screens as JPEGs from one of the apps that I use and found out that I now
had 22 files that were 5500x5500. And only the top-right corner was
filled out. Ugh.
So I took a sampling and figured out
what box would contain every jpg, and grabbed the Imaging library:
And wrote the
from path import path
box = (0,0,1000,750)
img = Image.open(fname)
rect = img.crop(box)
It took 30 seconds to run, and now I
have 22 images that are just the right size.
More information about the Omaha