[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/krita/core
From: Cyrille Berger <cyb () lepi ! org>
Date: 2004-08-31 20:44:23
Message-ID: 20040831204423.F00E09350 () office ! kde ! org
[Download RAW message or body]
CVS commit by berger:
* fix the copyright header of kis_convolution_painter.*
* correct a memory overflow in \
KisConvolutionPainter::applyConvolutionColorTransformation
M +7 -7 kis_convolution_painter.cc 1.2
M +1 -1 kis_convolution_painter.h 1.4
--- koffice/krita/core/kis_convolution_painter.cc #1.1:1.2
@@ -1,4 +1,4 @@
/*
- * Copyright (c) 2004 Adrian Page <adrian@pagenet.plus.com>
+ * Copyright (c) 2004 Cyrille Berger <cberger@cberger.net>
*
* This program is free software; you can redistribute it and/or modify
@@ -128,5 +128,5 @@ void KisConvolutionPainter::applyConvolu
currentPixel = curIt;
++curIt;
- memmove( pixels, pixels + 1, 9 * \
sizeof(KisPixelRepresentationReadOnly)); + memmove( \
pixels, pixels + 1, 8 * \
sizeof(KisPixelRepresentationReadOnly));
pixels[ CONVOLUTION_PIXEL_RIGHT ] = \
curIt.oldValue();
pixels[ CONVOLUTION_PIXEL_RIGHTBOTTOM ] = \
afterIt.oldValue(); @@ -202,5 +202,5 @@ void \
KisConvolutionPainter::applyConvolu currentPixel = curIt;
++curIt;
- memmove( pixels, pixels + 1, 9 * \
sizeof(KisPixelRepresentationReadOnly)); + memmove( \
pixels, pixels + 1, 8 * \
sizeof(KisPixelRepresentationReadOnly));
pixels[ CONVOLUTION_PIXEL_RIGHTTOP ] = \
beforeIt.oldValue(); ++beforeIt;
@@ -272,5 +272,5 @@ void KisConvolutionPainter::applyConvolu
currentPixel = curIt;
++curIt;
- memmove( pixels, pixels + 1, 9 * \
sizeof(KisPixelRepresentationReadOnly)); + memmove( \
pixels, pixels + 1, 8 * \
sizeof(KisPixelRepresentationReadOnly));
pixels[ CONVOLUTION_PIXEL_RIGHTTOP ] = \
beforeIt.oldValue(); ++beforeIt;
@@ -294,7 +294,7 @@ void KisConvolutionPainter::applyConvolu
sum = (sum == 0) ? 1 : sum;
currentPixel[ i ] = QMAX( 0, QMIN( QUANTUM_MAX, ( \
currentPixel[ i ] * matrix[i][1][1]
- \
+ pixels[ CONVOLUTION_PIXEL_BOTTOM - 1 ][i] * \
matrix[i][0][0]
- \
+ pixels[ CONVOLUTION_PIXEL_RIGHTBOTTOM - 1 ][i] * \
matrix[i][0][1]
- \
+ pixels[ CONVOLUTION_PIXEL_RIGHT - 1 ][i] * matrix[i][1][0] ) * \
matrix[i].sum() + \
+ pixels[ CONVOLUTION_PIXEL_LEFTTOP + 1 ][i] * matrix[i][0][0] + \
+ pixels[ CONVOLUTION_PIXEL_TOP + 1 ][i] * matrix[i][0][1] + \
+ pixels[ CONVOLUTION_PIXEL_LEFT + 1 ][i] * matrix[i][1][0] ) * \
matrix[i].sum()
/ \
matrix[i].factor() / sum + matrix[i].offset() ) ); }
--- koffice/krita/core/kis_convolution_painter.h #1.3:1.4
@@ -1,4 +1,4 @@
/*
- * Copyright (c) 2004 Adrian Page <adrian@pagenet.plus.com>
+ * Copyright (c) 2004 Cyrille Berger <cberger@cberger.net>
*
* This program is free software; you can redistribute it and/or modify
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic