On 18/11/14 09:24, Jason Y wrote:

With these images, I'm attempting to create a gif by resizing an image
(a 001.jpg) 10 times and than use a recursive function that should use
the next image (a 002.jpg) and resize that 10 times, etc...; until it
reaches "a 721.jpg", where it should stop.

In addition to my earlier comments I meant to add that you could consider creating a couple of helper functions:

1) to generate the filename from the file number

def nextFile(fnumber): ....

2) to resize the image

def resize(im):...


Your main loop then looks something like

while fileNumber < target:
    fname = nextFile(filenumber)
    im = Image(fname)
    resize(im)
    filenumber +=1


hth
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my phopto-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to