FastFourierTransformation example for C++ Builder

/* This example loads a bitmap and applies a FFT transformation. */
void __fastcall TForm1::Button1Click(TObject *Sender)
{
   /* 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( );
}