Functions

FreeImageQt supports the following functions. Note that in average use you only need FIQT_Register to use this library.

Subsections

FIQT_Register

bool FIQT_Register(bool new_formats_only = false);

Registers the FreeImage load functions in Qt and returns true if successful. If new_formats_only is true, only the bitmap formats not supported by Qt are registered. Else all bitmap formats supported by FreeImage are registered. You have to call this function to take advantage of FreeImage.

FIQT_Unregister

void FIQT_Unregister();

Removes all binding between FreeImage and Qt. You shouldn't normally have to call this function. It is called automatically on program exit.

FIQT_IsLoaded

Bool FIQT_IsLoaded();

Returns true if FreeImage was successfully registered into Qt's bitmap functionality handler, false otherwise.

FIQT_GetVersion

const char *FIQT_GetVersion();

Returns the version string of the library.

FIQT_GetCopyrightMessage

const char *FIQT_GetVersion();

Returns a short copyright message you can include in your program.

FIQT_GetFIFCount

int FIQT_GetFIFCount();

Returns the number of supported bitmap formats.

FIQT_GetFIFFromFormat

FREE_IMAGE_FORMAT FIQT_GetFIFFromFormat(const char *format);

Returns the FreeImage format ID for the given format string.

FIQT_GetFormatFromFIF

const char *FIQT_GetFormatFromFIF(FREE_IMAGE_FORMAT fif);

Returns a format string for the given FreeImage Format ID.

FIQT_GetFIFExtensionList

const char *FIQT_GetFIFExtensionList(FREE_IMAGE_FORMAT fif);

Returns a list of possible file extension for the given FreeImage Format ID. The extension list is a string containing one or more comma separated file extensions.

FIQT_GetFIFDescription

const char *FIQT_GetFIFDescription(FREE_IMAGE_FORMAT fif);

Returns a descriptive string for the given FreeImage Format ID.

FIQT_GetFIFFromFilename

FREE_IMAGE_FORMAT FIQT_GetFIFFromFilename(const char *filename);

Tries to identify a bitmap type by looking at the filename or a file extension. FreeImage_GetFIFFromFilename returns a valid FreeImage Format ID on success and FIF_UNKNOWN on failure.

FIQT_FIFSupportsReading

BOOL FIQT_FIFSupportsReading(FREE_IMAGE_FORMAT fif);

Returns true if the plugin belonging to this FreeImage Format ID supports reading, false otherwise.

FIQT_FIFSupportsWriting

BOOL FIQT_FIFSupportsWriting(FREE_IMAGE_FORMAT fif);

Returns true if the plugin belonging to this FreeImage Format ID supports writing, false otherwise.

FIQT_GetFileTypeFromFormat

const char *FIQT_GetFileTypeFromFormat(FREE_IMAGE_FORMAT fif);

This function is deprecated. FIQT_GetFIFFromFormat has replaced its functionality.

FIQT_GetFormatFromExtension

const char *FIQT_GetFormatFromExtension(const char *extension);

Returns a FreeImage Format string for the given file extension.