SkJpeg: Update gainmap encode and decode to reflect spec changes
The gainmap spec has changed how it represents vectors. Previously,
they were represented as "1,2,3". Now they are true XMP lists, with
three entries.
The gainmap spec has been changed to now require that the base image
have XMP and that that XMP specify the gainmap version (and that that
version be 1.0).
Update writing and parsing of vectors, and add more tests for this.
Update the writing to include the version. Do not yet require that
the version be written, because that will briefly break the feature
(old images will stop working).
Also, fix the interpretation of gamma. The definition given in
SkGainmapInfo is the inverse of what the XMP spec intended.
Bug: skia:14031
Change-Id: I34bef228fcd05823efbe76bbcf9f09a324c96fe3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/670657
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Christopher Cameron <ccameron@google.com>
(cherry picked from commit 6b8e2cd9a6bc442a9815a885461586ed29dcabf0)
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/686036
Reviewed-by: John Reck <jreck@google.com>
4 files changed