Download the PHP package maalls/anim-gif without Composer
On this page you can find all versions of the php package maalls/anim-gif. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package anim-gif
NOTE: This is a fork of Clément Guillemain's nice GifCreator class, with some API changes (class rename, new & updated methods, more flexible (and robust) parameter handling etc.), better error handling, several small corrections, code cosmetics & other improvements scattered all across.
About
AnimGif is a PHP class to create animated GIFs -- just list the source images (in various forms), and that's it!
Usage
1. Inputs:
2. Create the GIF:
3. Get/use the result:
You can now get the animated GIF binary:
...and e.g. send it directly to the browser:
Or just save it to a file:
Behavior
- Transparency is based on the first frame. [!!NOT VERIFIED: "It will be saved only if you give multiple frames with the same transparent background"]
- The dimensions of the generated GIF are based on the first frame, too. If you need to resize your images to get the same dimensions, you can use this class: https://github.com/Sybio/ImageWorkshop.
Dependencies
- PHP 5.3 (for namespace support & whatnot; noone still shamelessly uses PHP < 5.3, right?!)
- GD (
imagecreatefromstring
,imagegif
,imagecolortransparent
)
Credits
- László Zsidi: All the tough parts come from his GIFEncoder.class.php (also found here, in a Gist). Thanks, Laci!
- Clément Guillemain: for the very handy, redesigned (& "classified") API, extensions and nice docs!
- Matthew Flickinger: for his amazing, unbeatable GIF format dissection page.