L_AllocFTArray

#include "l_bitmap.h"

L_LTIMGCOR_API L_INT L_AllocFTArray(pBitmap, ppFTArray, uStructSize, uFlags)

Allocates a FTARRAY structure large enough to hold Fourier Transform coefficients for pBitmap. The structures uWidth and uHeight values are the same as the bitmaps width and height.

Parameters

pBITMAPHANDLE pBitmap

Pointer to the bitmap handle that references the bitmap.

pFTARRAY *ppFTArray

Pointer to a pointer to a FTARRAY structure. The function will allocate a FTARRAY structure large enough to contain the Fourier transform coefficients for the bitmap. The address of this structure will be stored into *ppFTData. When the array is no longer needed, the user should free this structure by calling the L_FreeFTArray function.

L_UINT uStructSize

The size of the structure. Should be sizeof(FTARRAY).

L_UINT32 uFlags

Flags that indicate whether or not to pad the input image with zeros to be able to perform FFT for images without dimensions that are a power of two. The following flags represent how to pad the image:

Value Meaning
FFT_PAD_NEVER [0x00000000] Don't pad the image.
FFT_PAD_OPTIMAL [0x00010000] Pad the height and width with zeros to make them both a power of two.
FFT_PAD_SQUARE [0x00020000] Pad the height and width with zeros to make them both the same power of two.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This function does not support signed data images. It returns the error code ERROR_SIGNED_DATA_NOT_SUPPORTED if a signed data image is passed to this function.

The amount allocated depends on the width and height of the image indicated in the bitmap handle

This function is used only when you are dealing with Fourier Transform functions.

When you are finished, you should free the allocated array by calling the L_FreeFTArray function.

This function supports 12 and 16-bit grayscale and 48 and 64-bit color images. Support for 12 and 16-bit grayscale and 48 and 64-bit color images is available in the Document and Medical Imaging toolkits.

This function does not support 32-bit grayscale images. It returns the error code ERROR_GRAY32_UNSUPPORTED if a 32-bit grayscale image is passed to this function.

Required DLLs and Libraries

Platforms

Win32, x64, Linux.

Help Version 21.0.2023.2.15
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Raster Imaging C API Help

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.