159 {
161
162
163 {
166
167
169
171 } else {
173 }
174 }
175
176
180
181 const bool needSrgbConversion = [&]() {
184 return true;
185 }
188 if (hasPrimaries) {
191 return false;
192 }
193 }
194 return true;
195 }();
196
197 if (
targetCs && needSrgbConversion) {
199 }
200
201
203 const quint32 width = image->
width() & bitmask;
204 const quint32 height = image->
height() & bitmask;
205 const int bufferSize = device->
pixelSize() * width * height;
206
208 if (resize)
210
213 const int outWidth = width / divider;
214 const int outHeight = height / divider;
215 uchar *outData =
reinterpret_cast<uchar *
>(
imageBuffer.data());
216
217 frame = QImage(outData, outWidth, outHeight, QImage::Format_ARGB32);
218 }
219
221
225 }
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
bool canStartCapture() const
int incrementAndGetIndex()
const KoColorSpace * targetCs
static constexpr int STATUS_OK
static constexpr int STATUS_BLOCKED
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...