avalanche123/Imagine — pull request #186 by rjkip (2013-01-07 12:28:22+00:00)
Title: Applying the canvas filter on animated GIFs

This pull request enables applying the canvas filter on (layers of) an animated GIF.

To achieve this, the following has been addressed:
* Image delays are accessible and can be modified
`public function ImageInterface#setDelay($delay)`
`public function ImageInterface#getDelay()`
* The canvas filter is now able to copy the delay into the new `ImageInterface`.
* As filters return a modified `ImageInterface`,
* layers should be replacable,
`public function LayersInterface#replace($offset, ImageInterface $image)`
* which is only possible if the image's resource is available (for internal use only).
`public function ImageInterface#getResource()`
* Also, GD now saves the first (and only) layer, as it may have been replaced.
* When working with GD layers, the GD resource is destroyed when a layer is garbage-collected (`ImageInterface#__destruct()`). To counteract this, I've wrapped the GD resource in a the `Imagine\Gd\Gd` class so it can be reused.