aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/colorspaceinfo.cpp
Commit message (Collapse)AuthorAge
* clang on windows supportGravatar Mike Klein2017-07-31
| | | | | | | | | | | | | | | | | 1) Run python bin/fetch-clang-win 2) Set clang_win = "../bin/clang_win" 3) ??? 4) Profit Most changes here are to pass the right -mfoo flags to Clang to enable advanced instruction sets, or fixed warning-as-errors. BUG=skia:2679 Change-Id: Ieed145d35c209131c7c16fdd3ee11a3de4a1a921 Reviewed-on: https://skia-review.googlesource.com/28740 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* use unique_ptr for codec factoriesGravatar Mike Reed2017-07-25
| | | | | | | | | | Will need guards for android (at least) Bug: skia: Change-Id: I2bb8e656997984489ef1f2e41cd3d301c4e7b947 Reviewed-on: https://skia-review.googlesource.com/26040 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
* add suggested decode color type to colorspaceinfoGravatar Mike Klein2017-07-24
| | | | | | | | | | | | | | | | | E.g. ~/skia (decode-as|✚1…) $ ninja -C out/ colorspaceinfo; and out/colorspaceinfo --input ~/Downloads/prophoto.png ninja: Entering directory `out/' [2/2] link colorspaceinfo SkCodec would naturally decode as colorType=RGBA_8888 Color Profile Description: "Google/Skia/215028B4833C240E0583AFE600C80A79" ... Change-Id: Id36efadaa84e9ffa5d67153e074be8a8426b6c42 Reviewed-on: https://skia-review.googlesource.com/26140 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* ICC: SkICCGetColorProfileTag supports special casesGravatar Hal Canary2017-07-10
| | | | | | | | | | | | | | | | | | | | | | | | Special cases: - "sRGB" - "AdobeRGB" - "DCI-P3" - "Linear Transfer with sRGB Gamut" - "2.2 Transfer with sRGB Gamut" - "sRGB Transfer with DCI-P3 Gamut" - "Linear Transfer with DCI-P3 Gamut" - "sRGB Transfer with Rec-BT-2020 Gamut" - "Linear Transfer with Rec-BT-2020 Gamut" tools/colorspaceinfo now prints out the Tag. Also: constants representing gSRGB_TransferFn, g2Dot2_TransferFn, and gLinear_TransferFn, gDCIP3_TransferFn. BUG=skia:6720 Change-Id: I92a3f9db9d744d3ec366e4e59afd759ba043c235 Reviewed-on: https://skia-review.googlesource.com/20225 Reviewed-by: Derek Sollenberger <djsollen@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* colorspaceinfo tool: Add flag to indicate that the input is an icc profileGravatar Matt Sarett2017-05-02
| | | | | | | | Bug: skia: Change-Id: Ieb5cff92bae1aa64df5bc7f3a398514fe5b20f77 Reviewed-on: https://skia-review.googlesource.com/14956 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Added A2B support to colorspaceinfo toolGravatar Matt Sarett2017-05-01
| | | | | | | | | | | | | Tool now parses A2B images/profiles. Tool can now display a cross-section based visualization for the color look-up tables in A2B profiles. BUG=skia: Change-Id: I68abb3e947b080c533e283783d7859feea8d35d6 Reviewed-on: https://skia-review.googlesource.com/6119 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* add drawString helper to canvasGravatar Cary Clark2017-04-28
| | | | | | | | | | | | | | | | | | Many tests and examples use drawText with a guess of how long the text is in bytes, or a call to strlen(). Add a helper to SkCanvas to simplify these examples. Add another helper for SkString. R=reed@google.com Change-Id: I0204a31e938f065606f08ee7cd9a6b36db791ee2 Reviewed-on: https://skia-review.googlesource.com/13642 Commit-Queue: Cary Clark <caryclark@google.com> Reviewed-by: Cary Clark <caryclark@google.com> Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Cary Clark <caryclark@skia.org>
* hide trivial helpers on canvasGravatar Mike Reed2017-02-22
| | | | | | | | | BUG=skia: Change-Id: I42d4ca92897bde5bd8e0575a0104b12b83134cef Reviewed-on: https://skia-review.googlesource.com/8852 Reviewed-by: Cary Clark <caryclark@google.com> Commit-Queue: Mike Reed <reed@google.com>
* SkColorSpace: remove named API, add gamut APIGravatar Matt Sarett2017-02-07
| | | | | | | | | | | Reland from: https://skia-review.googlesource.com/c/8021/ BUG=skia: Change-Id: I18985f130587b15fccbc86b76b2bb5c49ba5ba8a Reviewed-on: https://skia-review.googlesource.com/8136 Reviewed-by: Matt Sarett <msarett@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Revert "SkColorSpace: remove named API, add gamut API"Gravatar Matt Sarett2017-02-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ecaaf6f1c156e5690200322fc2636380c1f63dd8. Reason for revert: Breaks everything Original change's description: > SkColorSpace: remove named API, add gamut API > > BUG=skia: > > Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6 > Reviewed-on: https://skia-review.googlesource.com/8021 > Reviewed-by: Brian Osman <brianosman@google.com> > Reviewed-by: Mike Reed <reed@google.com> > Commit-Queue: Matt Sarett <msarett@google.com> > TBR=msarett@google.com,brianosman@google.com,reed@google.com,reviews@skia.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Change-Id: Ief5a0a4eeabe75a21f7512e23fc15309151066c4 Reviewed-on: https://skia-review.googlesource.com/8127 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* SkColorSpace: remove named API, add gamut APIGravatar Matt Sarett2017-02-07
| | | | | | | | | | BUG=skia: Change-Id: I01c5e1874c9a034febc64e25b3aaafb5050393a6 Reviewed-on: https://skia-review.googlesource.com/8021 Reviewed-by: Brian Osman <brianosman@google.com> Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Fix tool with swapped fC, fE (SkColorSpaceTransferFn)Gravatar Matt Sarett2017-01-12
| | | | | | | | | | | I missed updating this tool. BUG=skia: Change-Id: If5c79f0c41dd829ce8f952106660100ce4accca0 Reviewed-on: https://skia-review.googlesource.com/6963 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
* Added gamma visualizations to colorspaceinfo toolGravatar raftias2016-12-16
| | | | | | | | | | | | Visualizations for gamma curves were added. Tool now outputs at the end following 9 ='s a list of all output images. BUG=skia: Change-Id: Id934c4c8cceec68291527554c2c951be08593ef5 Reviewed-on: https://skia-review.googlesource.com/6085 Commit-Queue: Robert Aftias <raftias@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
* SkEncodeImage: no more link-time registrationGravatar Hal Canary2016-11-30
| | | | | | | | | | | | | | | Also, no more SkImageEncoder class. SK_SUPPORT_LEGACY_IMAGE_ENCODER_CLASS now only guards some old API shims. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5006 Change-Id: I3797f584f3e8e12ade10d31e8733163453725f40 Reviewed-on: https://skia-review.googlesource.com/5006 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-by: Mike Reed <reed@google.com>
* SkImageEncoder: simplify APIGravatar Hal Canary2016-11-23
| | | | | | | | | | | | | | | | | | | | | | | | (re-land 248ff02 & 2cb6cb7, with changes) - Hide SkImageEncoder class in private header. - SkImageEncoder::Type becomes SkEncodedImageFormat - SkEncodedFormat becomes SkEncodedImageFormat - SkImageEncoder static functions replaced with single function EncodeImage() - utility wrappers for EncodeImage() are in sk_tool_utils.h TODO: remove link-time registration mechanism. TODO: clean up clients use of API and flip the flag. TODO: implement EncodeImage() in chromeium/skia/ext Change-Id: I47d451e50be4d5c6c130869c7fa7c2857243d9f0 Reviewed-on: https://skia-review.googlesource.com/4909 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Reviewed-on: https://skia-review.googlesource.com/5186 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Hal Canary <halcanary@google.com>
* Revert 248ff023 & 2cb6cb72Gravatar Hal Canary2016-11-22
| | | | | | | | | | | | | | Revert "SkImageEncoder: simplify API" This reverts commit 248ff02331d7f73ee4b6c5a7eabeae1080c16cd4. Revert "Fix bug: can't convert nullptr -> bool" This reverts commit 2cb6cb7218171b357bb5c934f032ba69c7b78401. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=5151 NOTRY=true Change-Id: I5f6414392d6545f74db0b5bb50608d04f053a8ec Reviewed-on: https://skia-review.googlesource.com/5151 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Hal Canary <halcanary@google.com>
* SkImageEncoder: simplify APIGravatar Hal Canary2016-11-22
| | | | | | | | | | | | | | | | | | | | | | - Hide SkImageEncoder class in private header. - SkImageEncoder::Type becomes SkEncodedImageFormat - SkEncodedFormat becomes SkEncodedImageFormat - SkImageEncoder static functions replaced with single function EncodeImage() - utility wrappers for EncodeImage() are in sk_tool_utils.h TODO: remove link-time registration mechanism. TODO: clean up clients use of API and flip the flag. TODO: implement EncodeImage() in chromeium/skia/ext GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4909 Change-Id: Ib48b31fdc05cf23cda7f56ebfd67c841c149ce70 Reviewed-on: https://skia-review.googlesource.com/4909 Reviewed-by: Mike Reed <reed@google.com> Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
* Re-purpose color space toolGravatar Matt Sarett2016-11-11
(1) Compile tool with GN. (2) Rename tool to colorspaceinfo. (3) Support both images and icc profiles as input. (4) Print out information on transfer fn in addition to gamut. TODO: Output graphs of the three transfer fn curves. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4721 Change-Id: I2e75139685ea41446d3ae6f9803c8068ea05661a Reviewed-on: https://skia-review.googlesource.com/4721 Commit-Queue: Matt Sarett <msarett@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>