148 {
150
151 const bool needSrgbConversion = [&]() {
154 return true;
155 }
158 if (hasPrimaries) {
161 return false;
162 }
163 }
164 return true;
165 }();
166
167 if (
targetCs && needSrgbConversion) {
169 }
170
171
173 const quint32 width = image->
width() & bitmask;
174 const quint32 height = image->
height() & bitmask;
175 const int bufferSize = device->
pixelSize() * width * height;
176
178 if (resize)
180
183 const int outWidth = width / divider;
184 const int outHeight = height / divider;
185 uchar *outData =
reinterpret_cast<uchar *
>(
imageBuffer.data());
186
187 frame = QImage(outData, outWidth, outHeight, QImage::Format_ARGB32);
188 }
189
191
194 }
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
quint32 pixelSize() const
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...