Commit ca59d197 authored by Cyrille Berger's avatar Cyrille Berger
Browse files

forward port: fix bug in the creation of the kernel from a QImage

svn path=/trunk/koffice/; revision=547564
parent 23ee128d
......@@ -67,9 +67,9 @@ KisKernelSP KisKernel::fromQImage(const QImage& img)
qint32* itData = k->data;
const quint8* itImg = img.bits();
k->factor = 0;
for(uint i = 0; i < count; ++i , ++itData, ++itImg)
for(uint i = 0; i < count; ++i , ++itData, itImg+=4)
{
*itData = 255 - *itImg;
*itData = 255 - ( *itImg + *(itImg+1) + *(itImg+2) ) / 3;
k->factor += *itData;
}
return k;
......
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