SkICCPriv.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright 2016 Google Inc.
  3. *
  4. * Use of this source code is governed by a BSD-style license that can be
  5. * found in the LICENSE file.
  6. */
  7. #ifndef SkICCPriv_DEFINED
  8. #define SkICCPriv_DEFINED
  9. #include "include/core/SkColorSpace.h"
  10. #include "include/core/SkTypes.h"
  11. // This is equal to the header size according to the ICC specification (128)
  12. // plus the size of the tag count (4). We include the tag count since we
  13. // always require it to be present anyway.
  14. static constexpr size_t kICCHeaderSize = 132;
  15. // Contains a signature (4), offset (4), and size (4).
  16. static constexpr size_t kICCTagTableEntrySize = 12;
  17. static constexpr uint32_t kRGB_ColorSpace = SkSetFourByteTag('R', 'G', 'B', ' ');
  18. static constexpr uint32_t kCMYK_ColorSpace = SkSetFourByteTag('C', 'M', 'Y', 'K');
  19. static constexpr uint32_t kGray_ColorSpace = SkSetFourByteTag('G', 'R', 'A', 'Y');
  20. static constexpr uint32_t kDisplay_Profile = SkSetFourByteTag('m', 'n', 't', 'r');
  21. static constexpr uint32_t kInput_Profile = SkSetFourByteTag('s', 'c', 'n', 'r');
  22. static constexpr uint32_t kOutput_Profile = SkSetFourByteTag('p', 'r', 't', 'r');
  23. static constexpr uint32_t kColorSpace_Profile = SkSetFourByteTag('s', 'p', 'a', 'c');
  24. static constexpr uint32_t kXYZ_PCSSpace = SkSetFourByteTag('X', 'Y', 'Z', ' ');
  25. static constexpr uint32_t kLAB_PCSSpace = SkSetFourByteTag('L', 'a', 'b', ' ');
  26. static constexpr uint32_t kACSP_Signature = SkSetFourByteTag('a', 'c', 's', 'p');
  27. static constexpr uint32_t kTAG_rXYZ = SkSetFourByteTag('r', 'X', 'Y', 'Z');
  28. static constexpr uint32_t kTAG_gXYZ = SkSetFourByteTag('g', 'X', 'Y', 'Z');
  29. static constexpr uint32_t kTAG_bXYZ = SkSetFourByteTag('b', 'X', 'Y', 'Z');
  30. static constexpr uint32_t kTAG_rTRC = SkSetFourByteTag('r', 'T', 'R', 'C');
  31. static constexpr uint32_t kTAG_gTRC = SkSetFourByteTag('g', 'T', 'R', 'C');
  32. static constexpr uint32_t kTAG_bTRC = SkSetFourByteTag('b', 'T', 'R', 'C');
  33. static constexpr uint32_t kTAG_kTRC = SkSetFourByteTag('k', 'T', 'R', 'C');
  34. static constexpr uint32_t kTAG_A2B0 = SkSetFourByteTag('A', '2', 'B', '0');
  35. static constexpr uint32_t kTAG_CurveType = SkSetFourByteTag('c', 'u', 'r', 'v');
  36. static constexpr uint32_t kTAG_ParaCurveType = SkSetFourByteTag('p', 'a', 'r', 'a');
  37. static constexpr uint32_t kTAG_TextType = SkSetFourByteTag('m', 'l', 'u', 'c');
  38. enum ParaCurveType {
  39. kExponential_ParaCurveType = 0,
  40. kGAB_ParaCurveType = 1,
  41. kGABC_ParaCurveType = 2,
  42. kGABDE_ParaCurveType = 3,
  43. kGABCDEF_ParaCurveType = 4,
  44. };
  45. #endif // SkICCPriv_DEFINED