FAQ

TOC
There are too much files in project. How to reduce file count?
Easy!
Steps are:
  1. Keep next two files: color.hpp and color.pp2f.hpp and delete others.
  2. One of next:
    • In color.hpp add line #define COLOR_USE_PP2FILE before #if defined COLOR_USE_PP2FILE
    • define macro COLOR_USE_PP2FILE to be visible before include of color.hpp

      Example:
      #define COLOR_USE_PP2FILE
      #include "color/color.hpp"
    • Add compile switch which defines COLOR_USE_PP2FILE as macro.

      Examples:
      gcc: -D COLOR_USE_PP2FILE
      msvc: /DCOLOR_USE_PP2FILE
See also:
Macros.

get return only constant values. Where is get which return something modifiable like operator[] ?
This is by design.
When you use get you will be always sure that object is intact even is it non constant. Idea is to have function like vector::cbegin or vector::cend
Just separation of jurisdiction.
    gets only read,
    sets only modify,
    operator[] will do the both read and modify.

• How to reduce namespace path?
Try this:
#include "color/color.hpp"
namespace color
 {
  using namespace ::color::compare;
  using namespace ::color::constant;
  using namespace ::color::operation;
  using namespace ::color::trait;
  using namespace ::color::type;
 }
• Inconsistent from/to gray conversion?
Evry model has its own idea what is gray. lab has lightnes, yuv has luma, hwb has white.
• Where is YcbCr?
TODO. YcbCr is digitized version of YPbPr. TODO.
• Where are: 1,2,4 bits gray?
This type require special types of container. See boost::gil.
• Where are: red<double>::red(), red<double>::green(), red<double>::blue()?
Waiting for interface extending to be part of c++ standard.