Hi all, version 3.0.0 of the Swift PNG codec has been released. PNG is written in pure-Swift with the exception of the
zlib system dependency, and comes with tutorials, example code, and API documentation.
The library has been completely rewritten since version 2.0.1 and now features a much streamlined and improved API, as well as ancillary PNG chunk support, and a wider variety of color format inputs and outputs. Grayscale–alpha and indexed color now have first-class status in the 3.0 API, and are fully integrated with all PNG color backends in the file format’s specification. The typing system has also been greatly strengthened, resulting in an API which returns far fewer optionals, provides more expressive enumerations, and has a much greater chance of catching errors at compile time.
PNG is distributed as an ordinary SPM package (
import PNG), and has only one dependency,
zlib. PNG has no Foundation imports, and works on both Linux and MacOS.