Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit b9c57a6b authored by Jarosław Staniek's avatar Jarosław Staniek

KoColorConversionTransformation: msvc can't export static data, change it to inline static methods

Differential Revision: https://phabricator.kde.org/D361
parent 471f74d3
......@@ -122,8 +122,8 @@ private:
Traits::template sampleData<useOldData>(m_accessor, m_data, m_srcCS);
m_srcCS->convertPixelsTo(m_data, dst, m_dstCS, 1,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
}
private:
......
......@@ -127,8 +127,8 @@ void KisFixedPaintDevice::convertFromQImage(const QImage& _image, const QString
KoColorSpaceRegistry::instance()
->colorSpace( RGBAColorModelID.id(), Integer8BitsColorDepthID.id(), srcProfileName)
->convertPixelsTo(image.constBits(), data(), colorSpace(), image.width() * image.height(),
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
}
}
......
......@@ -113,8 +113,8 @@ public:
* Converts the paint device to a different colorspace
*/
void convertTo(const KoColorSpace * dstColorSpace = 0,
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::internalConversionFlags());
/**
* Fill this paint device with the data from image
*
......@@ -134,8 +134,8 @@ public:
* like sRGB).
*/
virtual QImage convertToQImage(const KoColorProfile *dstProfile, qint32 x, qint32 y, qint32 w, qint32 h,
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::InternalConversionFlags) const;
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::internalConversionFlags()) const;
/**
* Create an RGBA QImage from a rectangle in the paint device. The
......@@ -146,8 +146,8 @@ public:
* like sRGB).
*/
virtual QImage convertToQImage(const KoColorProfile *dstProfile,
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::InternalConversionFlags) const;
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::internalConversionFlags()) const;
/**
* Clear the given rectangle to transparent black.
......
......@@ -184,8 +184,8 @@ void KisGroupLayer::resetCache(const KoColorSpace *colorSpace)
m_d->paintDevice->colorSpace()->
convertPixelsTo(m_d->paintDevice->defaultPixel(), defaultPixel, colorSpace, 1,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
dev->setDefaultPixel(defaultPixel);
delete[] defaultPixel;
m_d->paintDevice = dev;
......
......@@ -1353,8 +1353,8 @@ QImage KisImage::convertToQImage(qint32 x,
KisPaintDeviceSP dev = projection();
if (!dev) return QImage();
QImage image = dev->convertToQImage(const_cast<KoColorProfile*>(profile), x, y, w, h,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
return image;
}
......@@ -1414,8 +1414,8 @@ QImage KisImage::convertToQImage(const QRect& scaledRect, const QSize& scaledIma
delete [] imageRow;
QImage image = colorSpace()->convertToQImage(scaledImageData, scaledRect.width(), scaledRect.height(), const_cast<KoColorProfile*>(profile),
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
delete [] scaledImageData;
......
......@@ -758,8 +758,8 @@ QImage KisLayer::createThumbnail(qint32 w, qint32 h)
return originalDevice ?
originalDevice->createThumbnail(w, h,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags) : QImage();
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags()) : QImage();
}
qint32 KisLayer::x() const
......
......@@ -342,8 +342,8 @@ QImage KisMask::createThumbnail(qint32 w, qint32 h)
return originalDevice ?
originalDevice->createThumbnail(w, h,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags) : QImage();
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags()) : QImage();
}
void KisMask::testingInitSelection(const QRect &rect)
......
......@@ -802,8 +802,8 @@ void KisPaintDevice::convertFromQImage(const QImage& _image, const KoColorProfil
KoColorSpaceRegistry::instance()
->colorSpace(RGBAColorModelID.id(), Integer8BitsColorDepthID.id(), profile)
->convertPixelsTo(image.constBits(), dstData, colorSpace(), image.width() * image.height(),
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
writeBytes(dstData, offsetX, offsetY, image.width(), image.height());
delete[] dstData;
......@@ -1148,8 +1148,8 @@ KisPaintDeviceSP KisPaintDevice::createCompositionSourceDevice(KisPaintDeviceSP
KisPaintDeviceSP clone = new KisPaintDevice(*cloneSource);
clone->setDefaultBounds(defaultBounds());
clone->convertTo(compositionSourceColorSpace(),
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
return clone;
}
......@@ -1159,8 +1159,8 @@ KisPaintDeviceSP KisPaintDevice::createCompositionSourceDevice(KisPaintDeviceSP
clone->setDefaultBounds(defaultBounds());
clone->makeCloneFromRough(cloneSource, roughRect);
clone->convertTo(compositionSourceColorSpace(),
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
return clone;
}
......
......@@ -443,8 +443,8 @@ public:
* @return a command that can be used to undo the conversion.
*/
KUndo2Command* convertTo(const KoColorSpace * dstColorSpace,
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::internalConversionFlags());
/**
* Changes the profile of the colorspace of this paint device to the given
......@@ -470,16 +470,16 @@ public:
* like sRGB).
*/
virtual QImage convertToQImage(const KoColorProfile *dstProfile, qint32 x, qint32 y, qint32 w, qint32 h,
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::InternalConversionFlags) const;
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::internalConversionFlags()) const;
/**
* Overridden method for convenience
*/
QImage convertToQImage(const KoColorProfile *dstProfile,
const QRect &rc,
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::InternalConversionFlags) const;
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::internalConversionFlags()) const;
/**
* Create an RGBA QImage from a rectangle in the paint device. The
......@@ -490,8 +490,8 @@ public:
* like sRGB).
*/
QImage convertToQImage(const KoColorProfile * dstProfile,
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::InternalConversionFlags) const;
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::internalConversionFlags()) const;
/**
* Creates a paint device thumbnail of the paint device, retaining
......@@ -515,15 +515,15 @@ public:
* @param rect: only this rect will be used for the thumbnail
*/
QImage createThumbnail(qint32 maxw, qint32 maxh, QRect rect,
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::internalConversionFlags());
/**
* Cached version of createThumbnail(qint32 maxw, qint32 maxh, const KisSelection *selection, QRect rect)
*/
QImage createThumbnail(qint32 maxw, qint32 maxh,
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::internalConversionFlags());
/**
* Fill c and opacity with the values found at x and y.
......
......@@ -170,8 +170,8 @@ void KisPainter::init()
d->mirrorVerticaly = false;
d->isOpacityUnit = true;
d->paramInfo = KoCompositeOp::ParameterInfo();
d->renderingIntent = KoColorConversionTransformation::InternalRenderingIntent;
d->conversionFlags = KoColorConversionTransformation::InternalConversionFlags;
d->renderingIntent = KoColorConversionTransformation::internalRenderingIntent();
d->conversionFlags = KoColorConversionTransformation::internalConversionFlags();
}
KisPainter::~KisPainter()
......
......@@ -262,8 +262,8 @@ QImage KisSelectionBasedLayer::createThumbnail(qint32 w, qint32 h)
return originalDevice && originalSelection ?
originalDevice->createThumbnail(w, h,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags) :
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags()) :
QImage();
}
......@@ -36,8 +36,8 @@ void KisColorSpaceConvertVisitorTest::testCreation()
KisImageSP image = new KisImage(0, 100, 100, lab, "test");
KisPaintLayerSP layer = new KisPaintLayer(image, "test", OPACITY_OPAQUE_U8, lab);
KisColorSpaceConvertVisitor test(image, lab, rgb,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
layer->accept(test);
QVERIFY(layer->colorSpace()->colorModelId() == rgb->colorModelId());
}
......
......@@ -74,8 +74,8 @@ void KisImageTest::testConvertImageColorSpace()
const KoColorSpace *cs16 = KoColorSpaceRegistry::instance()->rgb16();
image->lock();
image->convertImageColorSpace(cs16,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
image->unlock();
QVERIFY(*cs16 == *image->colorSpace());
......
......@@ -59,14 +59,14 @@ void KisSelectionTest::testGrayColorspaceConversion()
quint8 color2[2] = {64,32};
csA->convertPixelsTo(color2, color1, csNoA, 1,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
QCOMPARE((int)color1[0], 8);
csNoA->convertPixelsTo(color1, color2, csA, 1,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
QCOMPARE((int)color2[0], 8);
QCOMPARE((int)color2[1], 255);
......@@ -105,8 +105,8 @@ void KisSelectionTest::testGrayColorspaceOverComposition()
params.flow = 1.0;
csA->bitBlt(csA, params, csA->compositeOp(COMPOSITE_OVER),
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
QCOMPARE((int)color0[0], 56);
QCOMPARE((int)color0[1], 255);
......@@ -114,8 +114,8 @@ void KisSelectionTest::testGrayColorspaceOverComposition()
params.dstRowStart = color3;
csNoA->bitBlt(csA, params, csNoA->compositeOp(COMPOSITE_OVER),
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
QCOMPARE((int)color3[0], 56);
}
......
......@@ -304,7 +304,7 @@ bool KisGbrBrush::initFromPaintDev(KisPaintDeviceSP image, int x, int y, int w,
{
// Forcefully convert to RGBA8
// XXX profile and exposure?
setBrushTipImage(image->convertToQImage(0, x, y, w, h, KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags));
setBrushTipImage(image->convertToQImage(0, x, y, w, h, KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags()));
setName(image->objectName());
setHasColor(true);
......
......@@ -131,7 +131,7 @@ void KisCommonColors::recalculate()
KisImageWSP kisImage = m_canvas->image();
QImage image = kisImage->projection()->createThumbnail(1024, 1024, kisImage->bounds(), KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
QImage image = kisImage->projection()->createThumbnail(1024, 1024, kisImage->bounds(), KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
KisCommonColorsRecalculationRunner* runner = new KisCommonColorsRecalculationRunner(image, patchCount(), this);
QThreadPool::globalInstance()->start(runner);
......
......@@ -255,8 +255,8 @@ void KisUndoModel::addImage(int idx)
KisImageWSP historyImage = m_canvas->viewManager()->image();
KisPaintDeviceSP paintDevice = historyImage->projection();
QImage image = paintDevice->createThumbnail(32, 32,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
m_imageMap[currentCommand] = image;
}
......
......@@ -76,7 +76,7 @@ void KisOcioDisplayFilterTest::test()
KoColorSpaceRegistry::instance()->colorSpace(RGBAColorModelID.id(), Float32BitsColorDepthID.id(), 0);
KisImageSP image = utils::createImage(0, QSize(100, 100));
image->convertImageColorSpace(paintingCS, KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
image->convertImageColorSpace(paintingCS, KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
image->waitForDone();
dbgKrita << ppVar(paintingCS) << ppVar(image->root()->firstChild()->colorSpace());
......
......@@ -552,8 +552,8 @@ void KisGmicSimpleConvertor::convertToGmicImage(KisPaintDeviceSP dev, gmic_image
int blueOffset = greenOffset * 2;
int alphaOffset = greenOffset * 3;
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::InternalRenderingIntent;
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::InternalConversionFlags;
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::internalRenderingIntent();
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::internalConversionFlags();
const KoColorSpace * colorSpace = dev->colorSpace();
KisRandomConstAccessorSP it = dev->createRandomConstAccessorNG(0,0);
......@@ -615,8 +615,8 @@ void KisGmicSimpleConvertor::convertFromGmicImage(gmic_image<float>& gmicImage,
quint8 * floatRGBApixel = new quint8[rgbaFloat32bitcolorSpace->pixelSize() * optimalBufferSize];
quint32 pixelSize = rgbaFloat32bitcolorSpace->pixelSize();
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::InternalRenderingIntent;
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::InternalConversionFlags;
KoColorConversionTransformation::Intent renderingIntent = KoColorConversionTransformation::internalRenderingIntent();
KoColorConversionTransformation::ConversionFlags conversionFlags = KoColorConversionTransformation::internalConversionFlags();
// Krita needs rgba in 0.0...1.0
float multiplied = KoColorSpaceMathsTraits<float>::unitValue / gmicMaxChannelValue;
......
......@@ -98,7 +98,7 @@ void KisFilterFastColorTransfer::processImpl(KisPaintDeviceSP device,
const KoColorSpace* oldCS = device->colorSpace();
KisPaintDeviceSP srcLAB = new KisPaintDevice(*device.data());
dbgPlugins << "srcLab : " << srcLAB->extent();
KUndo2Command* cmd = srcLAB->convertTo(labCS, KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
KUndo2Command* cmd = srcLAB->convertTo(labCS, KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
delete cmd;
if (progressUpdater) {
......
......@@ -95,7 +95,7 @@ KisPropertiesConfiguration* KisWdgFastColorTransfer::configuration() const
}
dbgPlugins << "convert ref to lab";
KUndo2Command* cmd = ref->convertTo(labCS, KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
KUndo2Command* cmd = ref->convertTo(labCS, KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
delete cmd;
// Compute the means and sigmas of ref
......
......@@ -177,7 +177,7 @@ void KisFilterPhongBumpmap::processImpl(KisPaintDeviceSP device,
KisPaintDeviceSP bumpmapPaintDevice = new KisPaintDevice(KoColorSpaceRegistry::instance()->rgb16());
bumpmapPaintDevice->writeBytes(bumpmap.data(), outputArea.x(), outputArea.y(), outputArea.width(), outputArea.height());
KUndo2Command *leaker = bumpmapPaintDevice->convertTo(device->colorSpace(), KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
KUndo2Command *leaker = bumpmapPaintDevice->convertTo(device->colorSpace(), KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
KisPainter copier(device);
copier.bitBlt(outputArea.x(), outputArea.y(), bumpmapPaintDevice,
outputArea.x(), outputArea.y(), outputArea.width(), outputArea.height());
......
......@@ -65,7 +65,7 @@ KisImportExportFilter::ConversionStatus KisBMPExport::convert(const QByteArray&
QRect rc = input->image()->bounds();
input->image()->refreshGraph();
input->image()->lock();
QImage image = input->image()->projection()->convertToQImage(0, 0, 0, rc.width(), rc.height(), KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
QImage image = input->image()->projection()->convertToQImage(0, 0, 0, rc.width(), rc.height(), KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
input->image()->unlock();
image.save(url.toLocalFile());
return KisImportExportFilter::OK;
......
......@@ -209,7 +209,7 @@ KisImageBuilder_Result KisJPEGConverter::decode(const QUrl &uri)
KoColorTransformation* transform = 0;
if (profile && !profile->isSuitableForOutput()) {
transform = KoColorSpaceRegistry::instance()->colorSpace(modelId, Integer8BitsColorDepthID.id(), profile)->createColorConverter(cs, KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
transform = KoColorSpaceRegistry::instance()->colorSpace(modelId, Integer8BitsColorDepthID.id(), profile)->createColorConverter(cs, KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
}
// Apparently an invalid transform was created from the profile. See bug https://bugs.kde.org/show_bug.cgi?id=255451.
// After 2.3: warn the user!
......@@ -473,7 +473,7 @@ KisImageBuilder_Result KisJPEGConverter::buildFile(const QUrl &uri, KisPaintLaye
if (!m_batchMode) {
QMessageBox::information(0, i18nc("@title:window", "Krita"), i18n("Cannot export images in %1.\nWill save as RGB.", cs->name()));
}
KUndo2Command *tmp = layer->paintDevice()->convertTo(KoColorSpaceRegistry::instance()->rgb8(), KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
KUndo2Command *tmp = layer->paintDevice()->convertTo(KoColorSpaceRegistry::instance()->rgb8(), KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
delete tmp;
cs = KoColorSpaceRegistry::instance()->rgb8();
color_type = JCS_RGB;
......
......@@ -198,10 +198,10 @@ KisImportExportFilter::ConversionStatus KisPPMExport::convert(const QByteArray&
if (((rgb && (pd->colorSpace()->id() != "RGBA" && pd->colorSpace()->id() != "RGBA16"))
|| (!rgb && (pd->colorSpace()->id() != "GRAYA" && pd->colorSpace()->id() != "GRAYA16" && pd->colorSpace()->id() != "GRAYAU16")))) {
if (rgb) {
pd->convertTo(KoColorSpaceRegistry::instance()->rgb8(0), KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
pd->convertTo(KoColorSpaceRegistry::instance()->rgb8(0), KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
}
else {
pd->convertTo(KoColorSpaceRegistry::instance()->colorSpace(GrayAColorModelID.id(), Integer8BitsColorDepthID.id(), 0), KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
pd->convertTo(KoColorSpaceRegistry::instance()->colorSpace(GrayAColorModelID.id(), Integer8BitsColorDepthID.id(), 0), KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
}
}
......
......@@ -66,7 +66,7 @@ KisImportExportFilter::ConversionStatus KisTGAExport::convert(const QByteArray&
QRect rc = input->image()->bounds();
input->image()->refreshGraph();
input->image()->lock();
QImage image = input->image()->projection()->convertToQImage(0, 0, 0, rc.width(), rc.height(), KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
QImage image = input->image()->projection()->convertToQImage(0, 0, 0, rc.width(), rc.height(), KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
input->image()->unlock();
QFile f(filename);
......
......@@ -313,7 +313,7 @@ KisImageBuilder_Result KisTIFFConverter::readTIFFDirectory(TIFF* image)
KoColorTransformation* transform = 0;
if (profile && !profile->isSuitableForOutput()) {
dbgFile << "The profile can't be used in krita, need conversion";
transform = KoColorSpaceRegistry::instance()->colorSpace(colorSpaceId.first, colorSpaceId.second, profile)->createColorConverter(cs, KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
transform = KoColorSpaceRegistry::instance()->colorSpace(colorSpaceId.first, colorSpaceId.second, profile)->createColorConverter(cs, KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
}
// Check if there is an alpha channel
......
......@@ -768,14 +768,14 @@ void KisToolTransform::initThumbnailImage(KisPaintDeviceSP previewDevice)
createThumbnail(thumbRect.width(),
thumbRect.height(),
srcRect,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
thumbToImageTransform = scaleTransform.inverted();
} else {
origImg = m_selectedPortionCache->convertToQImage(0, x, y, w, h,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
thumbToImageTransform = QTransform();
}
......
......@@ -53,8 +53,8 @@ struct KisDisplayColorConverter::Private
paintingColorSpace(0),
monitorColorSpace(0),
monitorProfile(0),
renderingIntent(KoColorConversionTransformation::InternalRenderingIntent),
conversionFlags(KoColorConversionTransformation::InternalConversionFlags),
renderingIntent(KoColorConversionTransformation::internalRenderingIntent()),
conversionFlags(KoColorConversionTransformation::internalConversionFlags()),
displayFilter(0),
intermediateColorSpace(0),
displayRenderer(new DisplayRenderer(_q, _resourceManager))
......
......@@ -263,14 +263,14 @@ void KisImagePyramid::retrieveImageData(const QRect &rect)
m_displayFilter->filter(originalBytes.data(), numPixels);
} else {
QScopedArrayPointer<quint8> dst(new quint8[floatCs->pixelSize() * numPixels]);
projectionCs->convertPixelsTo(originalBytes.data(), dst.data(), floatCs, numPixels, KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
projectionCs->convertPixelsTo(originalBytes.data(), dst.data(), floatCs, numPixels, KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
m_displayFilter->filter(dst.data(), numPixels);
originalBytes.swap(dst);
}
{
QScopedArrayPointer<quint8> dst(new quint8[modifiedMonitorCs->pixelSize() * numPixels]);
floatCs->convertPixelsTo(originalBytes.data(), dst.data(), modifiedMonitorCs, numPixels, KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
floatCs->convertPixelsTo(originalBytes.data(), dst.data(), modifiedMonitorCs, numPixels, KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
originalBytes.swap(dst);
}
#endif
......
......@@ -146,7 +146,7 @@ void KisClipboard::setClip(KisPaintDeviceSP dev, const QPoint& topLeft)
QImage qimage;
KisConfig cfg;
const KoColorProfile *monitorProfile = cfg.displayProfile(QApplication::desktop()->screenNumber(qApp->activeWindow()));
qimage = dev->convertToQImage(monitorProfile, KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
qimage = dev->convertToQImage(monitorProfile, KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
if (!qimage.isNull() && mimeData) {
mimeData->setImageData(qimage);
}
......
......@@ -168,8 +168,8 @@ void KisCustomPattern::createPattern()
QString dir = KoResourceServerProvider::instance()->patternServer()->saveLocation();
m_pattern = new KoPattern(dev->createThumbnail(size.width(), size.height(), rc,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags), name, dir);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags()), name, dir);
}
......@@ -116,8 +116,8 @@ QVariant KisMimeData::retrieveData(const QString &mimetype, QVariant::Type prefe
doc->image()->waitForDone();
return doc->image()->projection()->convertToQImage(cfg.displayProfile(QApplication::desktop()->screenNumber(qApp->activeWindow())),
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
}
else if (mimetype == "application/x-krita-node" ||
mimetype == "application/zip") {
......
......@@ -590,7 +590,7 @@ KisImageBuilder_Result KisPNGConverter::buildImage(QIODevice* iod)
// Create the cmsTransform if needed
KoColorTransformation* transform = 0;
if (profile && !profile->isSuitableForOutput()) {
transform = KoColorSpaceRegistry::instance()->colorSpace(csName.first, csName.second, profile)->createColorConverter(cs, KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
transform = KoColorSpaceRegistry::instance()->colorSpace(csName.first, csName.second, profile)->createColorConverter(cs, KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
}
// Creating the KisImageWSP
......
......@@ -178,8 +178,8 @@ void KisPrescaledProjectionTest::testScalingUndeferredSmoothingPixelForPixel()
converter.setImage(image);
projection.setCoordinatesConverter(&converter);
projection.setMonitorProfile(0,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
projection.setImage(image);
// pixel-for-pixel, at 100% zoom
......@@ -213,8 +213,8 @@ void KisPrescaledProjectionTest::testScalingUndeferredSmoothing()
converter.setImage(image);
projection.setCoordinatesConverter(&converter);
projection.setMonitorProfile(0,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
projection.setImage(image);
testProjectionScenario(projection, &converter, "120dpi");
......@@ -245,8 +245,8 @@ void KisPrescaledProjectionTest::benchmarkUpdate()
converter.setImage(image);
projection.setCoordinatesConverter(&converter);
projection.setMonitorProfile(0,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
projection.setImage(image);
// Emulate "Use same aspect as pixels"
......@@ -302,8 +302,8 @@ public:
projection.setCoordinatesConverter(&converter);
projection.setMonitorProfile(0,
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
projection.setImage(image);
projection.notifyCanvasSizeChanged(QSize(100,100));
projection.notifyZoomChanged();
......
......@@ -307,8 +307,8 @@ void KisScratchPad::paintEvent ( QPaintEvent * event ) {
alignedImageRect.y(),
alignedImageRect.width(),
alignedImageRect.height(),
KoColorConversionTransformation::InternalRenderingIntent,
KoColorConversionTransformation::InternalConversionFlags);
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
QPainter gc(this);
gc.fillRect(event->rect(), m_checkBrush);
......@@ -367,7 +367,7 @@ QImage KisScratchPad::cutoutOverlay() const
KisPaintDeviceSP paintDevice = m_paintLayer->paintDevice();
QRect rc = widgetToDocument().mapRect(m_cutoutOverlay);
QImage rawImage = paintDevice->convertToQImage(0, rc.x(), rc.y(), rc.width(), rc.height(), KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
QImage rawImage = paintDevice->convertToQImage(0, rc.x(), rc.y(), rc.width(), rc.height(), KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
QImage scaledImage = rawImage.scaled(m_cutoutOverlay.size(),
Qt::IgnoreAspectRatio,
......
......@@ -103,7 +103,7 @@ KoColor::KoColor(const KoColor &src, const KoColorSpace * colorSpace)
d->data = new quint8[colorSpace->pixelSize()];
memset(d->data, 0, d->colorSpace->pixelSize());
src.colorSpace()->convertPixelsTo(src.d->data, d->data, colorSpace, 1, KoColorConversionTransformation::InternalRenderingIntent, KoColorConversionTransformation::InternalConversionFlags);
src.colorSpace()->convertPixelsTo(src.d->data, d->data, colorSpace, 1, KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::internalConversionFlags());
}
KoColor::KoColor(const KoColor & rhs)
......@@ -161,8 +161,8 @@ void KoColor::convertTo(const KoColorSpace * cs, KoColorConversionTransformation