TIFF6.0 Spec:
Page 31: ExtraSamples can only included in RGB mode image.
Page 39, SamplesPerPixel is usually 1 for bilevel, grayscale, and palette-color images.
Page 64, Currently Predictor field is used only with LZW.
Fixesgolang/go#6421.
R=bsiegert, nigeltao, gbulmer
CC=golang-dev
https://golang.org/cl/13779043
No functional change at the moment but it will allow choosing
the compression type.
This is an incompatible, user-visible change. To get the old
behavior, callers of tiff.Encode need to add ", nil" as the
last parameter.
R=nigeltao
CC=golang-dev
https://golang.org/cl/6479044
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 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