Releases: tayloraswift/swift-png
Swift PNG 4.0
Swift PNG
4.0.0
features
-
Powerful interfaces. Swift PNG’s expressive, strongly-typed APIs make working with PNG images easy for beginners and advanced users alike. If your code compiles, you’re already most of the way there. Power users can take advantage of custom indexing, manual decoding workflows, and user-defined color targets.
-
Superior compression. Swift PNG supports minimum cost path-based DEFLATE optimization, which is why it offers four additional compression levels beyond what libpng supports. Swift PNG outperforms libpng at its highest compression setting by significant margins for almost all types of input images.
-
Competitive performance. Swift PNG offers competitive performance compared to libpng. On appropriate CPU architectures, the Swift PNG encoder makes use of hardware-accelerated hash tables for even greater performance.
-
Pure Swift, all the way down. Aside from having no external dependencies, Swift PNG is powered by its own, native Swift DEFLATE implementation. This means Swift PNG works on any platform that Swift itself works on. It also means that Swift PNG’s performance improves as the Swift compiler matures.
-
Batteries included. Swift PNG comes with built-in color targets with support for premultiplied alpha. Convolution and deconvolution helper functions make implementing custom color targets a breeze.
On MacOS and Linux, Swift PNG has built-in file system support, allowing you to compress or decompress an image, given a filepath, in a single function call. Other platforms can take advantage of Swift PNG’s protocol-oriented IO to implement their own data loading.
-
First-class iPhone optimization support. Swift PNG requires no custom setup or third-party plugins to handle iPhone-optimized PNG images. iPhone-optimized images just work, on all platforms. Reproduce
pngcrush
’s output with bit width-aware alpha premultiplication, for seamless integration anywhere in your application stack. -
Comprehensive metadata support. Swift PNG can parse and validate all public PNG chunks, which are accessible as strongly-typed metadata records.
-
Modern error handling. Swift PNG has a fully stateless and Swift-native error-handling system.
PNG 3.0.2
PNG 3.0.1
This release fixes some compiler warnings due to compiler drift from Swift 4.2 to 5.2+, and with the agreement of all contributors, re-licenses the library under a weaker copyleft license, the Mozilla Public License 2.0.
PNG 3.0.0
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.
MaxPNG 2.0.1
This release adds a new overload to png_encode(path:raw_data:properties:chunk_size:)
that takes a Swift UnsafeBufferPointer<UInt8>
instead of an Array
, to avoid having to recopy a foreign array into Swift managed memory.
MaxPNG 2
In addition to being faster and more memory-efficient, MaxPNG 2 brings new features:
- Support for indexed-color and interlaced PNG files
- Passes all PNG test suite test cases
- Contiguous encoding and decoding functions, which are more efficient than the progressive variety
- Support for chroma keys, which are split between the
PLTE
andtRNS
chunks - RGBA normalization
- Ability to generate premultiplied alpha
- Ability to generate Cairo buffers from PNG files
- Ability to decompose interlaced PNGs into their constituent subimages
- Ability to encode indexed and interlaced PNG files
- Increased safety and validation
- Better-designed API and API naming
- Full API documentation
MaxPNG 1
1.0.0 Update README.md