bug in fftw plugin

16 views
Skip to first unread message

ajanta

unread,
Jun 15, 2006, 5:41:27 AM6/15/06
to Image-Apprentice

hello, all
there is a bug in informtion contained by cfftw plugin.
it is showing the same RGB value of any pixel in image.
bye

divyar...@gmail.com

unread,
Jun 15, 2006, 10:36:29 AM6/15/06
to Image-Apprentice
ajanta wrote:

> there is a bug in informtion contained by cfftw plugin.
> it is showing the same RGB value of any pixel in image.


Thanks! Ajanta,

Indeed there was a mistake.

In the function,
void CProcessor::DoFFT(BYTE *buffer, int width, int height, int
bytesPerPixel)
Instead of the following:

// Put it back in the original array
count = 0;
for(int i=0; i<width*height; i++)
{
buffer[count++] = (BYTE)tempB_1D[i];
buffer[count++] = (BYTE)tempB_1D[i];
buffer[count++] = (BYTE)tempB_1D[i];
}


it should be:

// Put it back in the original array
count = 0;
for(int i=0; i<width*height; i++)
{
buffer[count++] = (BYTE)tempB_1D[i];
buffer[count++] = (BYTE)tempG_1D[i];
buffer[count++] = (BYTE)tempR_1D[i];
}

I have corrected the source code and have the updated the precompiled
binaries too. They can be downloaded from:
http://divyarathore.googlepages.com/fftwpluginforimageapprentice


warm regards,
Divya Rathore
(remove underscores for email ID)

Reply all
Reply to author
Forward
0 new messages