Diffusion Krita 7261d7bd192b

Fix Lab channel render in canvas and Channels docker

Authored by lsegovia on Mar 5 2020, 1:30 AM.

Description

Fix Lab channel render in canvas and Channels docker

This moves the channel rendering code to a KoColorSpace function
named convertChannelToVisualRepresentation, implemented in
KoColorSpaceAbstract and overriden in Lab colorspaces.

This function now handles copying channel values and, where necessary,
renormalizes it so as to fit the valid channel range (as with Lab).

As a bonus, I also fixed scaleToU8 in Lab because it needed
the same renormalization procedure.

Thanks to Wolthera for the initial pseudopatch -- the missing part was
the canvas code.

BUG: 254784