[Tutor] Image manipluation (On-the-fly thumbnail creation)
Ajith Gopinath
qbits143 at gmail.com
Tue Sep 15 19:46:24 CEST 2009
import glob
import Image
for infile in glob.glob("*.jpg"):
im = Image.open(infile)
# converting to thumbnail image
im.thumbnail((128, 128), Image.ANTIALIAS)
im.save("thumb" + infile, "JPEG")
Will this be of ur help Vince?
On 15/09/2009, vince spicer <vinces1979 at gmail.com> wrote:
> On Tue, Sep 15, 2009 at 10:03 AM, dan06 <dan.king106 at yahoo.com> wrote:
>
>>
>> I've recently delved into python, about a week or so ago; I'm trying to
>> figure out how to create on-the-fly thumbnails. Are there python standard
>> library modules I could/should use or should I use external libraries
>> like:
>> GD, Gimp, or ImageMagick?
>> --
>> View this message in context:
>> http://www.nabble.com/Image-manipluation-%28On-the-fly-thumbnail-creation%29-tp25456792p25456792.html
>> Sent from the Python - tutor mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Tutor maillist - Tutor at python.org
>> To unsubscribe or change subscription options:
>> http://mail.python.org/mailman/listinfo/tutor
>>
>
>
> check out:
>
> http://www.pythonware.com/products/pil/
>
>
> creating thumbnail example here
>
> http://www.pythonware.com/library/pil/handbook/image.htm
>
>
> Vince
>
--
|| a j i t ||
More information about the Tutor
mailing list