Read
From XnView Wiki
gflGetDefaultLoadParams
The gflGetDefaultLoadParams function sets the GFL_LOAD_PARAMS structure with default values. To use before call of gflLoadBitmap.
void gflGetDefaultLoadParams(
GFL_LOAD_PARAMS * load_params
);
Parameters
load_params Pointer to a GFL_LOAD_PARAMS structure.
See also
gflGetDefaultThumbnailParams, gflGetDefaultSaveParams, gflLoadBitmap, gflLoadBitmapFromHandle,
gflLoadBitmap
The gflLoadBitmap function load a picture file into memory.
GFL_ERROR gflLoadBitmap(
const char * filename, GFL_BITMAP ** bitmap, GFL_LOAD_PARAMS * params, GFL_FILE_INFORMATION * informations,
);
Parameters
filename Pointer to a null-terminated string that contains the filename to load. bitmap Address of a pointer to a GFL_BITMAP structure. params Pointer to a GFL_LOAD_PARAMS structure. This structure must be filled correctly. informations Pointer to a GFL_FILE_INFORMATION structure. Can be NULL if you don't want it. You must use gflFreeInformation to free his content.
Return value
The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
See also
gflGetDefaultLoadParams, gflGetDefaultThumbnailParams, gflGetDefaultSaveParams, gflLoadBitmapFromMemory, gflLoadBitmapFromHandle, gflLoadThumbnail, gflLoadThumbnailFromMemory, gflLoadThumbnailFromHandle, gflSaveBitmap, gflSaveBitmapIntoMemory, gflSaveBitmapIntoHandle
gflLoadBitmapFromMemory
The gflLoadBitmapFromMemory function load a picture from memory.
GFL_ERROR gflLoadBitmapFromMemory(
GFL_UINT8 * data, GFL_UINT32 data_length, GFL_BITMAP ** bitmap, GFL_LOAD_PARAMS * params, GFL_FILE_INFORMATION * informations,
);
Parameters
data Pointer to the picture. data_length Length of data. bitmap Address of a pointer to a GFL_BITMAP structure. params Pointer to a GFL_LOAD_PARAMS structure. This structure must be filled correctly. informations Pointer to a GFL_FILE_INFORMATION structure. Can be NULL if you don't want it. You must use gflFreeInformation to free his content.
Return value
The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
See also
gflGetDefaultLoadParams, gflGetDefaultThumbnailParams, gflGetDefaultSaveParams, gflLoadBitmap, gflLoadBitmapFromHandle, gflLoadThumbnail, gflLoadThumbnailFromMemory, gflLoadThumbnailFromHandle, gflSaveBitmap, gflSaveBitmapIntoMemory, gflSaveBitmapIntoHandle
gflLoadBitmapFromHandle
The gflLoadBitmapFromHandle function load a picture into memory with the use of read callback functions.
GFL_ERROR gflLoadBitmapFromHandle(
GFL_HANDLE handle, GFL_BITMAP ** bitmap, GFL_LOAD_PARAMS * params, GFL_FILE_INFORMATION * informations,
);
Parameters
handle User handle. The Callbacks field of the GFL_LOAD_PARAMS structure must be filled correctly. bitmap Address of a pointer to a GFL_BITMAP structure. params Pointer to a GFL_LOAD_PARAMS structure. This structure must be filled correctly. informations Pointer to a GFL_FILE_INFORMATION structure. Can be NULL if you don't want it. You must use gflFreeInformation to free his content.
Return value
The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
See also
gflGetDefaultLoadParams, gflGetDefaultThumbnailParams, gflGetDefaultSaveParams, gflLoadBitmap, gflLoadBitmapFromMemory, gflLoadThumbnail, gflLoadThumbnailFromMemory, gflLoadThumbnailFromHandle, gflSaveBitmap, gflSaveBitmapIntoMemory, gflSaveBitmapIntoHandle
gflGetDefaultPreviewParams
The gflGetDefaultPreviewParams function sets the GFL_LOAD_PARAMS structure with default values. To use before call of gflLoadPreview.
void gflGetDefaultPreviewParams(
GFL_LOAD_PARAMS * load_params
);
Parameters
load_params Pointer to a GFL_LOAD_PARAMS structure.
See also
gflGetDefaultLoadParams, gflGetDefaultSaveParams, gflLoadThumbnail, gflLoadThumbnailFromHandle,
gflLoadThumbnail
The gflLoadThumbnail function load a picture file as a thumbnail into memory.
GFL_ERROR gflLoadThumbnail(
const char * filename, GFL_INT32 width, GFL_INT32 height, GFL_BITMAP ** bitmap, GFL_LOAD_PARAMS * params, GFL_FILE_INFORMATION * informations,
);
Parameters
filename Pointer to a null-terminated string that contains the filename to load. width Width of the thumbnail. height Height of the thumbnail. bitmap Address of a pointer to a GFL_BITMAP structure. params Pointer to a GFL_LOAD_PARAMS structure. This structure must be filled correctly. informations Pointer to a GFL_FILE_INFORMATION structure. Can be NULL if you don't want it. You must use gflFreeInformation to free his content.
Return value
The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
See also
gflGetDefaultLoadParams, gflGetDefaultThumbnailParams, gflGetDefaultSaveParams, gflLoadBitmap, gflLoadBitmapFromMemory, gflLoadBitmapFromHandle, gflLoadThumbnailFromMemory, gflLoadThumbnailFromHandle, gflSaveBitmap, gflSaveBitmapIntoMemory, gflSaveBitmapIntoHandle
gflLoadThumbnailFromMemory
The gflLoadThumbnailFromMemory function load a picture file as a thumbnail from memory.
GFL_ERROR gflLoadThumbnailFromMemory(
GFL_UINT8 * data, GFL_UINT32 data_length, GFL_INT32 width, GFL_INT32 height, GFL_BITMAP ** bitmap, GFL_LOAD_PARAMS * params, GFL_FILE_INFORMATION * informations,
);
Parameters
data Pointer to the picture. data_length Length of data. width Width of the thumbnail. height Height of the thumbnail. bitmap Address of a pointer to a GFL_BITMAP structure. params Pointer to a GFL_LOAD_PARAMS structure. This structure must be filled correctly. informations Pointer to a GFL_FILE_INFORMATION structure. Can be NULL if you don't want it. You must use gflFreeFileInformation to free his content.
Return value
The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
See also
gflGetDefaultLoadParams, gflGetDefaultThumbnailParams, gflGetDefaultSaveParams, gflLoadBitmap, gflLoadBitmapFromMemory, gflLoadBitmapFromHandle, gflLoadThumbnail, gflLoadThumbnailFromHandle, gflSaveBitmap, gflSaveBitmapIntoMemory, gflSaveBitmapIntoHandle
gflLoadThumbnailFromHandle
The gflLoadThumbnailFromHandle function load a picture file as a thumbnail into memory with the use of read callback functions.
GFL_ERROR gflLoadThumbnailFromHandle(
GFL_HANDLE handle, GFL_INT32 width, GFL_INT32 height, GFL_BITMAP ** bitmap, GFL_LOAD_PARAMS * params, GFL_FILE_INFORMATION * informations,
);
Parameters
handle User handle. The Callbacks field of the GFL_LOAD_PARAMS structure must be filled correctly. width Width of the thumbnail. height Height of the thumbnail. bitmap Address of a pointer to a GFL_BITMAP structure. params Pointer to a GFL_LOAD_PARAMS structure. This structure must be filled correctly. informations Pointer to a GFL_FILE_INFORMATION structure. Can be NULL if you don't want it. You must use gflFreeFileInformation to free his content.
Return value
The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
See also
gflGetDefaultLoadParams, gflGetDefaultThumbnailParams, gflGetDefaultSaveParams, gflLoadBitmap, gflLoadBitmapFromMemory, gflLoadBitmapFromHandle, gflLoadThumbnail, gflLoadThumbnailFromMemory, gflSaveBitmap, gflSaveBitmapIntoMemory, gflSaveBitmapIntoHandle
gflGetFileInformation
The gflGetFileInformation function retrieves all informations about a picture file.
GFL_ERROR gflGetFileInformation(
const char * filename, GFL_INT32 index, GFL_FILE_INFORMATION * information
);
Parameters
filename Pointer to a null-terminated string that contains the filename. index Index of format. -1 for automatic recognition. information Pointer to a GFL_FILE_INFORMATION structure. You must use gflFreeFileInformation to free his content.
Return value
The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
See also
gflLoadBitmap, gflLoadBitmapFromHandle, gflLoadThumbnail, gflLoadThumbnailFromHandle
gflGetFileInformationFromMemory
The gflGetFileInformationFromMemory function retrieves all informations about a picture from memory.
GFL_ERROR gflGetFileInformationFromMemory(
GFL_UINT8 * data, GFL_UINT32 data_length, GFL_INT32 index, GFL_FILE_INFORMATION * information
);
Parameters
data Pointer to the picture. data_length Length of data. index Index of format. -1 for automatic recognition. information Pointer to a GFL_FILE_INFORMATION structure. You must use gflFreeFileInformation to free his content.
Return value
The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
See also
gflLoadBitmap, gflLoadBitmapFromMemory, gflLoadBitmapFromHandle, gflLoadThumbnail, gflLoadThumbnailFromMemory, gflLoadThumbnailFromHandle
gflGetFileInformationFromHandle
The gflGetFileInformationFromHandle function retrieves all informations about a picture with the use of read callback functions.
GFL_ERROR gflGetFileInformationFromHandle(
GFL_HANDLE handle, GFL_INT32 index, const GFL_LOAD_CALLBACKS * callbacks, GFL_FILE_INFORMATION * information
);
Parameters
handle User handle. index Index of format. -1 for automatic recognition. callbacks Callback to access picture data. information Pointer to a GFL_FILE_INFORMATION structure. You must use gflFreeFileInformation to free his content.
Return value
The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
See also
gflLoadBitmap, gflLoadBitmapFromMemory, gflLoadBitmapFromHandle, gflLoadThumbnail, gflLoadThumbnailFromMemory, gflLoadThumbnailFromHandle
gflFreeFileInformation
The gflFreeFileInformation function frees the content of a GFL_FILE_INFORMATION structure.
void gflFreeFileInformation(
GFL_FILE_INFORMATION * information
);
Parameters
bitmap Pointer to a GFL_FILE_INFORMATION structure.
See also
gflGetFileInformation, gflLoadBitmap, gflLoadBitmapFromHandle, gflLoadThumbnail, gflLoadThumbnailFromHandle