diff --git a/libs/pigment/resources/KoSegmentGradient.cpp b/libs/pigment/resources/KoSegmentGradient.cpp index 75eb81d..2b71c18 100644 --- a/libs/pigment/resources/KoSegmentGradient.cpp +++ b/libs/pigment/resources/KoSegmentGradient.cpp @@ -490,7 +490,11 @@ KoGradientSegment::RGBColorInterpolationStrategy *KoGradientSegment::RGBColorInt void KoGradientSegment::RGBColorInterpolationStrategy::colorAt(KoColor& dst, qreal t, const KoColor& _start, const KoColor& _end) const { //FIXME: hack to get a color space with the bitdepth of the gradients(8bit), but with the colour profile of the image// - const KoColorSpace* mixSpace = KoColorSpaceRegistry::instance()->rgb16(dst.colorSpace()->profile()); + const KoColorSpace* mixSpace = + KoColorSpaceRegistry::instance()->colorSpace( + dst.colorSpace()->colorModelId(), + Integer16BitsColorDepthID, + dst.colorSpace()->profile()); KoAbstractGradient::mixTwoColors(_start, _end, t, mixSpace, &dst); } diff --git a/libs/pigment/resources/KoStopGradient.cpp b/libs/pigment/resources/KoStopGradient.cpp index ca9110f..f13bd2b 100644 --- a/libs/pigment/resources/KoStopGradient.cpp +++ b/libs/pigment/resources/KoStopGradient.cpp @@ -160,7 +160,11 @@ void KoStopGradient::colorAt(KoColor& dst, qreal t) const // buffer = KoColor(colorSpace()); //} //hack to get a color space with the bitdepth of the gradients(8bit), but with the colour profile of the image// - const KoColorSpace* mixSpace = KoColorSpaceRegistry::instance()->rgb16(dst.colorSpace()->profile()); + const KoColorSpace* mixSpace = + KoColorSpaceRegistry::instance()->colorSpace( + dst.colorSpace()->colorModelId(), + Integer16BitsColorDepthID, + dst.colorSpace()->profile()); const KoGradientStop& leftStop = *(stop - 1); const KoGradientStop& rightStop = *(stop);