[IMAGE-SIG] Animation
Yu Jiang
jiang@geosun.indstate.edu
Fri, 15 Aug 1997 11:32:38 -0500
Hi Everybody,
I have displayed a .tif file in a canvas with scrollbars, by importing
PIL. Now I need to do such a thing:
As the scrollbars move, the image will rotate according to the
scrollbar's position, such as left, right.
I can make the image to rotate an angle by calling Image.rotate() of PIL,
however, I failed to make the image to continue to rotate according to
the scrollbars's positions. I hope somebody can help me out, or tell me
what manual I can read.
So far, I tried to achieve this goal by a strategy of 'copy & paste':
1) As scrollbars moved in a new position, copy the original image by PIL
copy function: im = image.copy()
2) Then rotate it by im.rotate(angle)
3) Finally, paste it on the original: image.paste(im)
def rePaint(self, angle):
im = self.image.copy()
im.rotate(angle)
self.image.paste(im)
self.update_idletasks()
However, my code does not work, nor with error. I hope somebody help me.
Thank you!
huey
_______________
IMAGE-SIG - SIG on Image Processing with Python
send messages to: image-sig@python.org
administrivia to: image-sig-request@python.org
_______________