Kaydet (Commit) 1a8aedb9 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#3002 speed up cymk conversion a tad

Change-Id: Ie9e3c26b10301f4d2fa12d2cd6a221dd64001158
üst 7af7c18c
......@@ -290,6 +290,7 @@ void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputStream,
if (rContext.cinfo.out_color_space == JCS_CMYK)
{
// convert CMYK to RGB
Scanline pScanline = pAccess->GetScanline(yIndex);
for (long cmyk = 0, x = 0; cmyk < nWidth * 4; cmyk += 4, ++x)
{
int color_C = 255 - rContext.pCYMKBuffer[cmyk + 0];
......@@ -301,7 +302,7 @@ void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputStream,
sal_uInt8 cGreen = aRangeLimit[255L - (color_M + color_K)];
sal_uInt8 cBlue = aRangeLimit[255L - (color_Y + color_K)];
pAccess->SetPixel(yIndex, x, BitmapColor(cRed, cGreen, cBlue));
pAccess->SetPixelOnData(pScanline, x, BitmapColor(cRed, cGreen, cBlue));
}
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment