Performance for an RGBA image:
benchmark old ns/op new ns/op delta
BenchmarkEncode 1633495 7897 -99.52%
benchmark old MB/s new MB/s speedup
BenchmarkEncode 37.83 7824.96 206.85x
NRGBA images are now encoded as such, the spec calls it
"unassociated alpha".
R=nigeltao, rsc
CC=golang-dev
https://golang.org/cl/6308049
The idea is to see whether it is worthwhile to implement special cases.
On my Mac Book Pro:
BenchmarkEncode 1000 1689656 ns/op 36.69 MB/s
R=nigeltao, minux.ma
CC=golang-dev
https://golang.org/cl/6278050
The basic functionality works. Features to add in future CLs:
- compression
- fast paths for image formats that can be directly expressed in TIFF,
such as RGBA, NRGBA and maybe Gray and Paletted.
R=nigeltao
CC=golang-dev
https://golang.org/cl/5694051