Skip to content
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

This is an optimized version of the GIFDecoder and GIFEncoder classes, by László Zsidi. (source: and

NOTE: two github repositories have been created since then :

It avoid GIFGetByte/GIFPutByte for the images content. Instead, it is copied directly to the returned images. This eliminates a lot of ord() and chr() calls, which leads to about x4 speed improvement for large images.

Some other improvements :

  • it uses the SplFixedArray to improve the performances of GIFGetByte, so it requires PHP >=5.3.
  • it allows you to extract the dimensions and position of each frame, if you want to rebuild your animation after some modifications.
  • GIFEncoder : added transparency feature
You can’t perform that action at this time.