msf_gif.h»Blog
Miles
Over the past month, I've updated the library from version 1.2 to 2.1, which include the following changes:
- I've changed the API to return the resulting gif in-memory, rather than progressively writing it to a file. It was technically possible, in previous library versions, to replace the file ops with versions that wrote to memory, but the details of doing so were really janky. This way, the old use case remains easy (just fwrite the whole buffer), but it should now also be just as easy to use other file I/O methods, or do arbitrary things like embedding the gif in another file, etc.
- The library now conforms more tightly to the spec in some edge cases. I hadn't run into any problems with any gif decoders in practice, but it's good for peace of mind.
- Minor documentation fixes and improvements.
Miles
Since submitting the project to the network, I've updated the library from version 1.0 to 1.2, which includes the following improvements:
- I simplified the API by removing the `upsideDown` boolean parameter. Now, to flip the image, you just pass in a negative pitch.
- You can now implement custom memory and file output by defining some macros.
- The library got ~40% faster on my test corpus, bringing it to around 500 MB/s average, 300 MB/s worst-case on my laptop.
- The maximum bit depth was increased from 15 to 16.
- The code now compiles (in C++ mode) using MSVC 2010, and should be more compatible with older compilers in general.
- Many small fixes and improvements to documentation.
- The code got shorter and simpler, which I consider to be a valuable feature of the library.

With all these changes implemented, I consider the project to be functionally complete. I have no further features specifically planned, aside from probably an ARM NEON version of the SIMD code at some point.