Resize image before uploading
Where Internet connection is slow, it takes too much time to upload images. Few days ago I was trying to upload some images in facebook and it seemed to take forever. The I wrote the following python program to reduce the image size (around 4MB to around 100 KB!):
import Image
import os, sys
# adjust width and height to your needs
width = 800
height = 600
for root, dirs, files in os.walk('./'):
for name in files:
filename = os.path.join(root, name)
if filename.endswith('jpg'):
print filename
imin = Image.open(filename)
imout = imin.resize((width, height), Image.BICUBIC)
imout.save(filename)
Comments
I need to know whether python or jython able to do cross platform activity like accessing outlook 2007 objects (dll) and to send mail through outlook via source code.
send me the sample code to test it.
Best Regards,
Fernandez
fernandez10273@gmail.com