Off-by-many error
Boudewijn Rempt
boud at valdyas.org
Sun Aug 21 16:21:29 CEST 2005
In KisPaintDevice::convertTo, there was an off-by-many bug when converting
between cmyk and other colorspaces:
The slower code works correctly, the clever code doesn't -- and I cannot find
out what exaclyt doesn't work there, so I'll just checkin the correct code
for now... I need to get this working before Akademy because I want to show
off our CMYK to the astonished and appreciative audience.
#if 0
KisHLineIterator srcIt = createHLineIterator( x, row, w, false );
KisHLineIterator dstIt = dst.createHLineIterator( x, row, w, true );
while ( !srcIt.isDone() ) {
m_colorStrategy->convertPixelsTo( srcIt.rawData(), m_profile,
dstIt.rawData(), dstColorStrategy, dstProfile, 1, renderingIntent );
++srcIt;
++dstIt;
}
#else
Q_INT32 column = x;
Q_INT32 columnsRemaining = w;
while (columnsRemaining > 0) {
Q_INT32 numContiguousDstColumns = dst.numContiguousColumns(column,
row, row);
Q_INT32 numContiguousSrcColumns = numContiguousColumns(column,
row, row);
Q_INT32 columns = QMIN(numContiguousDstColumns,
numContiguousSrcColumns);
columns = QMIN(columns, columnsRemaining);
const Q_UINT8 *srcData = pixel(column, row);
Q_UINT8 *dstData = dst.writablePixel(column, row);
m_colorStrategy -> convertPixelsTo(srcData, m_profile, dstData,
dstColorStrategy, dstProfile, columns, renderingIntent);
column += columns;
columnsRemaining -= columns;
}
#endif
--
Boudewijn Rempt
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20050821/37d049ef/attachment.pgp
More information about the kimageshop
mailing list