-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
Hi -
I intend to start contributing something to the GIF code in PIL, in order to have "more Pythonic" support for animations.
I am opening this as a communication channel so that I don't waste time in solutions that would not be acceptable to the project,
and to function as an umbrella issue for smaller PRs I can come up with.
One first idea would be to be able to work with animations by using the index-notation in animated images, by implementing __getitem__ in GifImageFile -
instead of having to go through the existing "seek" and "tell" methods - so one can do: img[1] to get the first layer
as a first class Image, instead of using the current seek and tell methods. Does that sound reasonable?
I'd do that in order one could get the actual pixels for the frame: as it is now, with "seek" one gets the composed
image from frame 0 up to the current frame, and it is not possible to get the actual frame pixels in PIL.
Using the different approach would left seek untouched, so that any code relying in the current behavior remains working.
Also, if there is some "roadmap" like document for animation in PIL, I'd like to be pointed to it.
Another feature would be to make the img.info namespace writable and consistent to the active frame, so that it becomes possible to change the animation delay (and other parameters) for each frame when saving the file.