Re: libspng: a modern libpng alternative
Bob Friesenhahn <[email protected]> Wed, 12 Sep 2018 12:41:32 -0500 (CDT)
| Newsgroups | gmane.comp.graphics.png.devel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 12 Sep 2018, Randy via png-mng-implement wrote: > libspng(https://libspng.org) is a C library for reading and writing Portable Network Graphics (PNG) format files with a focus on security and ease of use. > > It is written from scratch in C99 as an alternative to libpng, it does not share > any code. It is faster at decoding than libpng when compiled with profile-guided optimizations. This looks like a nice start and it is easy to use. Thinking into the future, you should consider the ease of maintaining shared library ABI stability. The current API will likely have problems with this as features in the library grow and you find a need to change/add structure members. It is very useful if either user interface structures are opaque (forward-declared pointers or void pointer) with accessor functions for all attributes (a lot of work), or if APIs are provided which allocate/deallocate each structure type from the heap using the actual size known to the library. Any structure which is allocated by the using application/library is set in stone (without re-compiling all dependent code) if the using application/library allocates it based on the size it had at compilation time. Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/