My digital camera takes pictures with a very high resolution, and I have a PIL script to shrink them to 800x600 (or 600x800). However, it would be nice for the resultant file to retain the original timestamp. I noticed in the docs that I can use a File object instead of a name in PIL's image save method, but I don't know if that will help or not.
My code is basically
name, ext = os.path.splitext(filename)
# open an image file (.bmp,.jpg,.png,.gif) you have in the working folder
image = Image.open(filename)
width = 800
height = 600
w, h = image.size
if h > w:
width = 600
height = 800
name = name + ".jpg"
shunken = image.resize((width, height), Image.ANTIALIAS)
shunken.save(name)
Thank you for any help you can give!