Changeset View
Changeset View
Standalone View
Standalone View
krita/image/kis_fixed_paint_device.cpp
Show First 20 Lines • Show All 121 Lines • ▼ Show 20 Line(s) | 114 | { | |||
---|---|---|---|---|---|
122 | 122 | | |||
123 | // Don't convert if not no profile is given and both paint dev and qimage are rgba. | 123 | // Don't convert if not no profile is given and both paint dev and qimage are rgba. | ||
124 | if (srcProfileName.isEmpty() && colorSpace()->id() == "RGBA") { | 124 | if (srcProfileName.isEmpty() && colorSpace()->id() == "RGBA") { | ||
125 | memcpy(data(), image.constBits(), image.byteCount()); | 125 | memcpy(data(), image.constBits(), image.byteCount()); | ||
126 | } else { | 126 | } else { | ||
127 | KoColorSpaceRegistry::instance() | 127 | KoColorSpaceRegistry::instance() | ||
128 | ->colorSpace( RGBAColorModelID.id(), Integer8BitsColorDepthID.id(), srcProfileName) | 128 | ->colorSpace( RGBAColorModelID.id(), Integer8BitsColorDepthID.id(), srcProfileName) | ||
129 | ->convertPixelsTo(image.constBits(), data(), colorSpace(), image.width() * image.height(), | 129 | ->convertPixelsTo(image.constBits(), data(), colorSpace(), image.width() * image.height(), | ||
130 | KoColorConversionTransformation::InternalRenderingIntent, | 130 | KoColorConversionTransformation::internalRenderingIntent(), | ||
131 | KoColorConversionTransformation::InternalConversionFlags); | 131 | KoColorConversionTransformation::internalConversionFlags()); | ||
132 | } | 132 | } | ||
133 | } | 133 | } | ||
134 | 134 | | |||
135 | QImage KisFixedPaintDevice::convertToQImage(const KoColorProfile * dstProfile, KoColorConversionTransformation::Intent intent, KoColorConversionTransformation::ConversionFlags conversionFlags) const | 135 | QImage KisFixedPaintDevice::convertToQImage(const KoColorProfile * dstProfile, KoColorConversionTransformation::Intent intent, KoColorConversionTransformation::ConversionFlags conversionFlags) const | ||
136 | { | 136 | { | ||
137 | qint32 x1; | 137 | qint32 x1; | ||
138 | qint32 y1; | 138 | qint32 y1; | ||
139 | qint32 w; | 139 | qint32 w; | ||
▲ Show 20 Lines • Show All 171 Lines • Show Last 20 Lines |