| 1 |
gif-h |
| 2 |
===== |
| 3 |
|
| 4 |
This one-header library offers a simple, very limited way to create animated GIFs directly in code. |
| 5 |
Those looking for particular cleverness are likely to be disappointed; it's pretty much a straight-ahead |
| 6 |
implementation of the GIF format with optional Floyd-Steinberg dithering. (It does at least use delta |
| 7 |
encoding - only the changed portions of each frame are saved.) |
| 8 |
|
| 9 |
So resulting files are often quite large. The hope is that it will be handy nonetheless as a quick and easily-integrated way for programs to spit out animations. |
| 10 |
|
| 11 |
Only RGBA8 is currently supported as an input format. (The alpha is ignored.) |
| 12 |
|
| 13 |
Email me : ctangora -at- gmail -dot- com |
| 14 |
|
| 15 |
Usage: |
| 16 |
------------------- |
| 17 |
Create a GifWriter struct. |
| 18 |
|
| 19 |
Pass the struct to GifBegin() to initialize values and write the file header. |
| 20 |
|
| 21 |
Pass frames of the animation to GifWriteFrame(). |
| 22 |
|
| 23 |
Finally, call GifEnd() to close the file handle and free memory. |