CMYK: remove unnecessary qPremultiply calls
Although the output of these functions is premultiplied ARGB, we know the alpha is always going to be full (1.0) because the source is CMYK 32 bit (without alpha). We can therefore avoid calling qPremultiply. This work has been kindly sponsored by the QGIS project (https://qgis.org/). Change-Id: I129b601f5c93a1c444ab06c3325f946d2bcc6efc Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>bb10
parent
697e1b0397
commit
72c242c7a2
|
|
@ -1676,7 +1676,7 @@ static const QRgba64 *QT_FASTCALL convertCMYK32ToToRGBA64PM(QRgba64 *buffer, con
|
|||
const QList<QRgb> *, QDitherInfo *)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = qPremultiply(QCmyk32::fromCmyk32(src[i]).toColor().rgba64());
|
||||
buffer[i] = QCmyk32::fromCmyk32(src[i]).toColor().rgba64();
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
|
@ -1685,7 +1685,7 @@ static const uint *QT_FASTCALL fetchCMYK32ToARGB32PM(uint *buffer, const uchar *
|
|||
{
|
||||
const uint *s = reinterpret_cast<const uint *>(src) + index;
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = qPremultiply(QCmyk32::fromCmyk32(s[i]).toColor().rgba());
|
||||
buffer[i] = QCmyk32::fromCmyk32(s[i]).toColor().rgba();
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
|
@ -1694,7 +1694,7 @@ static const QRgba64 *QT_FASTCALL fetchCMYK32ToRGBA64PM(QRgba64 *buffer, const u
|
|||
{
|
||||
const uint *s = reinterpret_cast<const uint *>(src) + index;
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffer[i] = qPremultiply(QCmyk32::fromCmyk32(s[i]).toColor().rgba64());
|
||||
buffer[i] = QCmyk32::fromCmyk32(s[i]).toColor().rgba64();
|
||||
return buffer;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue