On 2009-07-28 02:52, Tejovathi P wrote:
I have a JPEG image of size 25KB and I want to compress it to 15KB, But
I want to keep the original height and width same and reduce the size of
the image. Is there any easy way to achieve this? Please let me know.
You can try adjusting the 'quality' keyword argument of the save()
method to save space.
im = Image.open('original.jpg')
im.save('other.jpg', quality=50)
I don't know of a way to hit your 15KB target in a single shot, but
would try various quality settings until your size target is achieved.
http://www.pythonware.com/library/pil/handbook/format-jpeg.htm
_______________________________________________
Image-SIG maillist - Image-SIG@python.org
http://mail.python.org/mailman/listinfo/image-sig