Home
Phabricator
Search
Log In
Paste
P70
Masterwork From Distant Lands
Active
Public
Actions
Authored by
dkazakov
on Mar 5 2017, 12:54 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Subscribers
None
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);
dkazakov
edited the content of this paste.
(Show Details)
Mar 5 2017, 12:54 PM
dkazakov
changed the title of this paste from untitled to
Masterwork From Distant Lands
.
dkazakov
updated the paste's language from
autodetect
to
autodetect
.
Log In to Comment