Commit f643fc7b authored by Wolthera van Hövell's avatar Wolthera van Hövell 🛍

Fix softproofing

It's slow again :/
parent cbc91c07
......@@ -452,14 +452,15 @@ bool KoColorSpace::proofPixelsTo(const quint8 * src,
}*/
// Only the icc engine can do this kind of stuff
//Can we cache this, maybe???
if (d->iccEngine) {
if (!d->iccEngine) {
d->iccEngine = KoColorSpaceEngineRegistry::instance()->get("icc");
//qDebug() << ">>>>>>>>>>>>>>>>>>>> we got a proofing engine";
qDebug() << ">>>>>>>>>>>>>>>>>>>> we got a proofing engine";
}
if (!d->iccEngine) return false;
KoColorConversionTransformation *transform = d->iccEngine->createColorProofingTransformation(this, dstColorSpace, proofingSpace, renderingIntent, conversionFlags);
Q_UNUSED(transform);
//Q_UNUSED(transform);
transform->transform(src, dst, numPixels);
delete transform;
return true;
......
......@@ -79,7 +79,6 @@ public:
qint32 dstPixelSize = dstColorSpace()->pixelSize();
cmsDoTransform(m_transform, const_cast<quint8 *>(src), dst, numPixels);
// Lcms does nothing to the destination alpha channel so we must convert that manually.
while (numPixels > 0) {
qreal alpha = srcColorSpace()->opacityF(src);
......@@ -121,13 +120,16 @@ public:
}
}
quint16 alarm[4];//cyan!
alarm[0] = 65535;
alarm[1] = 0;
alarm[2] = 0;
alarm[3] = 65535;
quint16 alarm[cmsMAXCHANNELS];//cyan!
alarm[0] = 0;
alarm[1] = 65535;
alarm[2] = 65535;
cmsSetAlarmCodes(alarm);
qDebug()<<"Test gamut check";
qDebug()<<conversionFlags.testFlag(KoColorConversionTransformation::GamutCheck);
qDebug()<<conversionFlags.testFlag(KoColorConversionTransformation::SoftProofing);
m_transform = cmsCreateProofingTransform(srcProfile->lcmsProfile(),
srcColorSpaceType,
dstProfile->lcmsProfile(),
......@@ -155,7 +157,6 @@ public:
qint32 dstPixelSize = dstColorSpace()->pixelSize();
cmsDoTransform(m_transform, const_cast<quint8 *>(src), dst, numPixels);
// Lcms does nothing to the destination alpha channel so we must convert that manually.
while (numPixels > 0) {
qreal alpha = srcColorSpace()->opacityF(src);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment