Diffusion Krita cf54d5bd50de

Rewrite alpha colorspaces using templates and make them correct

Authored by dkazakov on Apr 27 2017, 8:27 AM.

Description

Rewrite alpha colorspaces using templates and make them correct

  1. Non-U8 alpha color spaces were not connected to the color conversion system. Therefore, one couldn't convert to/from them any data
  1. 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 bigger).
  1. 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.
  1. 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.

Details

Committed
dkazakovApr 27 2017, 8:27 AM
Parents
R37:dcb9aab8cb9f: Implement reading of zipped layer transparency masks from PSD
Branches
Unknown
Tags
Unknown