157 {
159
160
162
163
167
168 const bool needSrgbConversion = [&]() {
171 return true;
172 }
175 if (hasPrimaries) {
178 return false;
179 }
180 }
181 return true;
182 }();
183
184 if (
targetCs && needSrgbConversion) {
186 }
187
188
190 const quint32 width = image->
width() & bitmask;
191 const quint32 height = image->
height() & bitmask;
192 const int bufferSize = device->
pixelSize() * width * height;
193
195 if (resize)
197
200 const int outWidth = width / divider;
201 const int outHeight = height / divider;
202 uchar *outData =
reinterpret_cast<uchar *
>(
imageBuffer.data());
203
204 frame = QImage(outData, outWidth, outHeight, QImage::Format_ARGB32);
205 }
206
208
211 }
const KoID Integer8BitsColorDepthID("U8", ki18n("8-bit integer/channel"))
const KoID RGBAColorModelID("RGBA", ki18n("RGB/Alpha"))
ColorPrimaries
The colorPrimaries enum Enum of colorants, follows ITU H.273 for values 0 to 255, and has extra known...
@ PRIMARIES_ITU_R_BT_709_5
TransferCharacteristics
The transferCharacteristics enum Enum of transfer characteristics, follows ITU H.273 for values 0 to ...
const KoColorSpace * colorSpace() const
KisPaintDeviceSP projection() const
void immediateLockForReadOnly()
QRect bounds() const override
quint32 pixelSize() const
void makeCloneFromRough(KisPaintDeviceSP src, const QRect &minimalRect)
void convertTo(const KoColorSpace *dstColorSpace, KoColorConversionTransformation::Intent renderingIntent=KoColorConversionTransformation::internalRenderingIntent(), KoColorConversionTransformation::ConversionFlags conversionFlags=KoColorConversionTransformation::internalConversionFlags(), KUndo2Command *parentCommand=nullptr, KoUpdater *progressUpdater=nullptr)
void readBytes(quint8 *data, qint32 x, qint32 y, qint32 w, qint32 h) const
virtual KoID colorModelId() const =0
virtual KoID colorDepthId() const =0
virtual const KoColorProfile * profile() const =0
const KoColorSpace * targetCs
virtual ColorPrimaries getColorPrimaries() const
getColorPrimaries
virtual bool hasColorants() const =0
virtual TransferCharacteristics getTransferCharacteristics() const
getTransferCharacteristics This function should be subclassed at some point so we can get the value f...