FastFourierTransformation example for Delphi
{ This example loads a bitmap and applies a FFT transformation. }
procedure TForm1.Button1Click(Sender: TObject);
begin
{ Load the bitmap, keeping the bits per pixel of the file }
LEADImage1.Load ('image1.cmp', 0, 1, 1 );
{ Resize the bitmap to make sure the bitmap dimensions are power of two }
LEADImage1.Size(256, 512, SIZE_BICUBIC);
{Allocate FFT buffer}
LEADImage1.InitFourierTransformationData ( );
{Apply FFT }
LEADImage1. FastFourierTransformation( FFT_FFT + FFT_GRAY );
{ Free FFT buffer }
LEADImage1.FreeFourierTransformationData ( );
end;