[Tutor] [tutor] Pil image related question -- resending message without attachments
varsha.purohit at gmail.com
Sun Jan 6 05:22:57 CET 2008
I am actually working on a project which deals with image processing.
I just used pil function to resize the image into the dimensions i want. i
was able to resize the image but the clarity of the new image is not good.
Can anyone suggest which other functions i should use to improve the
clarity. I am attaching the code and sending the images in the attachment.
Can anyone suggest me how to do it ?
imageFile = "srk.jpg" #original small image
im1 = Image.open(imageFile)
width = 680
height = 420
im2 = im1.resize((width,height), Image.NEAREST)
im3 = im1.resize ((width,height), Image.BICUBIC)
#images get saved in c drive with jpg extensions
ext = ".jpg"
im2.save("C:/nearest" + ext)
im3.save("C:/Bicubic" + ext)
print "files are saved"
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor