From: joncruz Date: Wed, 31 Dec 2008 20:10:09 +0000 (+0000) Subject: Change lcms transforms to match change of display buffer from RGB-24 to ARGB-32 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e40c9077cd9a6ac8217f90e4de01f521ab7d85ed;p=inkscape.git Change lcms transforms to match change of display buffer from RGB-24 to ARGB-32 --- diff --git a/src/color-profile.cpp b/src/color-profile.cpp index 513e15e78..42650b170 100644 --- a/src/color-profile.cpp +++ b/src/color-profile.cpp @@ -860,9 +860,9 @@ cmsHTRANSFORM Inkscape::colorprofile_get_display_transform() dwFlags |= cmsFLAGS_PRESERVEBLACK; } #endif // defined(cmsFLAGS_PRESERVEBLACK) - transf = cmsCreateProofingTransform( ColorProfile::getSRGBProfile(), TYPE_RGB_8, hprof, TYPE_RGB_8, proofProf, intent, proofIntent, dwFlags ); + transf = cmsCreateProofingTransform( ColorProfile::getSRGBProfile(), TYPE_ARGB_8, hprof, TYPE_ARGB_8, proofProf, intent, proofIntent, dwFlags ); } else if ( hprof ) { - transf = cmsCreateTransform( ColorProfile::getSRGBProfile(), TYPE_RGB_8, hprof, TYPE_RGB_8, intent, 0 ); + transf = cmsCreateTransform( ColorProfile::getSRGBProfile(), TYPE_ARGB_8, hprof, TYPE_ARGB_8, intent, 0 ); } } @@ -1020,9 +1020,9 @@ cmsHTRANSFORM Inkscape::colorprofile_get_display_per( Glib::ustring const& id ) dwFlags |= cmsFLAGS_PRESERVEBLACK; } #endif // defined(cmsFLAGS_PRESERVEBLACK) - item.transf = cmsCreateProofingTransform( ColorProfile::getSRGBProfile(), TYPE_RGB_8, item.hprof, TYPE_RGB_8, proofProf, intent, proofIntent, dwFlags ); + item.transf = cmsCreateProofingTransform( ColorProfile::getSRGBProfile(), TYPE_ARGB_8, item.hprof, TYPE_ARGB_8, proofProf, intent, proofIntent, dwFlags ); } else if ( item.hprof ) { - item.transf = cmsCreateTransform( ColorProfile::getSRGBProfile(), TYPE_RGB_8, item.hprof, TYPE_RGB_8, intent, 0 ); + item.transf = cmsCreateTransform( ColorProfile::getSRGBProfile(), TYPE_ARGB_8, item.hprof, TYPE_ARGB_8, intent, 0 ); } } diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index 651bd0414..97713b18e 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -1781,7 +1781,7 @@ sp_canvas_paint_single_buffer (SPCanvas *canvas, int x0, int y0, int x1, int y1, #if ENABLE_LCMS if ( transf && canvas->enable_cms_display_adj ) { for ( gint yy = 0; yy < (y1 - y0); yy++ ) { - guchar* p = buf.buf + (sw * 3) * yy; + guchar* p = buf.buf + (buf.buf_rowstride * yy); cmsDoTransform( transf, p, p, (x1 - x0) ); } }