Commit Graph

3 Commits

Author SHA1 Message Date
Mike Klein
fd731e4684 add a few more ways to convert images to imgcvt
Interestingly, the draw ends up a little different than the
writePixels() and skcms paths.  Maybe just premul/unpremul?

Bug: chromium:867813
Change-Id: I8bf645c8354cbeb9a07512add258e8defc755366
Reviewed-on: https://skia-review.googlesource.com/c/164621
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2018-10-23 17:57:18 +00:00
Mike Klein
06a215b768 add profile->profile mode to imgcvt
E.g.

out/imgcvt /System/Library/ColorSync/Profiles/ITU-2020.icc ~/skcms/profiles/mobile/sRGB_parametric.icc
(0, 0, 0) --> (+0.0000, +0.0000, +0.0000)
(1, 1, 1) --> (+0.9998, +0.9998, +0.9998)
(1, 0, 0) --> (+1.2481, -0.3879, -0.1435)
(0, 1, 0) --> (-0.7903, +1.0561, -0.3501)
(0, 0, 1) --> (-0.2992, -0.0886, +1.0503)
(0, 1, 1) --> (-0.8325, +1.0527, +1.0077)
(1, 0, 1) --> (+1.2239, -0.4000, +1.0428)
(1, 1, 0) --> (+1.0312, +1.0035, -0.3791)

Change-Id: Ieb38a3b519f00ae56491c3265ed9725888b692e9
Reviewed-on: https://skia-review.googlesource.com/152360
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2018-09-06 18:54:19 +00:00
Mike Klein
7af351a68c add imgcvt
This uses skcms to convert an image into a PNG with a new color profile.

Change-Id: Iaefdbbfba6f4b85637386569a65355df255b980d
Reviewed-on: https://skia-review.googlesource.com/143709
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Auto-Submit: Mike Klein <mtklein@google.com>
2018-07-27 15:11:17 +00:00