• Dmitry Kazakov's avatar
    Rewrite alpha colorspaces using templates and make them correct · cf54d5bd
    Dmitry Kazakov authored
    1) Non-U8 alpha color spaces were not connected to the color
       conversion system. Therefore, one couldn't convert to/from
       them any data
    2) The code of their methods were blindly copied from U8 color space,
       therefore all the functions (incl. toQColor/fromQColor/difference)
       just read wrong values from pointers (quint8 instead of quint16 or
    3) Now all the alpha color spaces are rewritten using a common template
       and the same code reused for all of them, with correct pointer
       conversions using KoColorSpaceMaths.
    4) The new color spaces are converted to the conversion system using
       existing Factory::colorConversionLinks() framework. Yes, they are
       created using factories.
    Open Questions:
    1) In KoColorSpaceRegistry there are some special cases about persistent
       storage of d->alphaCs and 'OwnedByRegistryRegistryDeletes' flags. I
       couldn't find any info about it, so it might be incorrect.