diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-01-30 20:51:40 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-01-30 20:55:10 +0000 |
commit | 1a8aedb933f6c82c84804de3e282412deb190a79 (patch) | |
tree | bbe911a89edaef7eb86210346598506e6f09d57a /vcl | |
parent | 7af7c18c11cfdb781daf6a8c4c7112d247f8c4a0 (diff) |
ofz#3002 speed up cymk conversion a tad
Change-Id: Ie9e3c26b10301f4d2fa12d2cd6a221dd64001158
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/jpeg/jpegc.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx index 6b4cce3607b1..98b642e13d82 100644 --- a/vcl/source/filter/jpeg/jpegc.cxx +++ b/vcl/source/filter/jpeg/jpegc.cxx @@ -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 |