Pure-Swift implementation of PNG file encoding and decoding
WIP: implements some encoding and decoding and algorithms, for some bit depths.
PNG file format spec: http://www.libpng.org/pub/png/spec/1.2/PNG-Contents.html
let pngFileData:Data = ....
let image = SampledImage(pngData: pngFileData)
let image:SampledImage = ...
let pngFileData:Data? = image.pngData
You may find interesting
Accommodate updated SwiftGraphicsCore 2.0.0 - 2020-05-15 03:56:04
Fix bug in average filter. - 2020-05-13 01:47:15
Fix bugs - 2020-05-10 14:47:09
Fix bug in Package.swift. Fix unknown crashing issue by avoiding mutating compressedData by removing chunks until it is empty, instead, iterate on selecting slices of it.
Remove SwiftSampledGraphics - 2020-05-03 22:47:38
Removes the dependence on SwiftSampledGraphics and uses SwiftSampledCore where SampledImage and SampledGraphicsContext now live.
Add indexed colors - 2020-05-02 22:27:36
Supports indexed colors, including transparency. Adds some support for low bit depths. Interlaced images still crash. Adds many test case files, but test results are still manually examined for visual similarity through round-trip re-encoding.
Initial release - 2020-05-02 22:26:05
Supports reading some images with many filter versions. Writing is always filtered the same way. Does not support indexed colors, or low bit counts, or interlacing properly.