Difference between revisions of "Read"
From XnView Wiki
(21 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== gflGetDefaultLoadParams == | == gflGetDefaultLoadParams == | ||
The gflGetDefaultLoadParams function sets the [[Structures#GFL_LOAD_PARAMS|GFL_LOAD_PARAMS]] structure with default values. | The gflGetDefaultLoadParams function sets the [[Structures#GFL_LOAD_PARAMS|GFL_LOAD_PARAMS]] structure with default values. Must be called before gflLoadBitmap*. | ||
void gflGetDefaultLoadParams( | void <b>gflGetDefaultLoadParams</b>( | ||
GFL_LOAD_PARAMS* load_params | |||
); | ); | ||
Line 18: | Line 18: | ||
== gflLoadBitmap == | == gflLoadBitmap == | ||
The gflLoadBitmap function | The gflLoadBitmap function loads a picture file into memory. | ||
GFL_ERROR gflLoadBitmap( | GFL_ERROR <b>gflLoadBitmap</b>( | ||
const char* filename, | |||
GFL_BITMAP** bitmap, | |||
const GFL_LOAD_PARAMS* params, | |||
GFL_FILE_INFORMATION * informations | |||
); | ); | ||
Line 41: | Line 41: | ||
'''Return value''' | '''Return value''' | ||
:The function returns GFL_NO_ERROR if it is successful or a value of [[Error|GFL_ERROR]]. | :The function returns GFL_NO_ERROR if it is successful or a value of [[Error|GFL_ERROR]]. | ||
'''Remark''' | |||
:gflLoadBitmapW exists for the windows unicode version of GFLSDK | |||
'''See also''' | '''See also''' | ||
:[[#gflGetDefaultLoadParams|gflGetDefaultLoadParams]], [[#gflLoadBitmapFromMemory|gflLoadBitmapFromMemory]], [[#gflLoadBitmapFromHandle|gflLoadBitmapFromHandle]] | :[[#gflGetDefaultLoadParams|gflGetDefaultLoadParams]], [[#gflLoadBitmapFromMemory|gflLoadBitmapFromMemory]], [[#gflLoadBitmapFromHandle|gflLoadBitmapFromHandle]] | ||
== gflLoadBitmapFromMemory == | == gflLoadBitmapFromMemory == | ||
The gflLoadBitmapFromMemory function | The gflLoadBitmapFromMemory function loads a picture from memory. | ||
GFL_ERROR gflLoadBitmapFromMemory( | GFL_ERROR <b>gflLoadBitmapFromMemory</b>( | ||
const GFL_UINT8* data, | |||
GFL_UINT32 data_length, | |||
GFL_BITMAP** bitmap, | |||
const GFL_LOAD_PARAMS* params, | |||
GFL_FILE_INFORMATION* informations, | |||
); | ); | ||
Line 78: | Line 80: | ||
'''See also''' | '''See also''' | ||
:[[#gflGetDefaultLoadParams|gflGetDefaultLoadParams]], [[#gflLoadBitmap|gflLoadBitmap]], [[#gflLoadBitmapFromHandle|gflLoadBitmapFromHandle]] | :[[#gflGetDefaultLoadParams|gflGetDefaultLoadParams]], [[#gflLoadBitmap|gflLoadBitmap]], [[#gflLoadBitmapFromHandle|gflLoadBitmapFromHandle]] | ||
== gflLoadBitmapFromHandle == | == gflLoadBitmapFromHandle == | ||
The gflLoadBitmapFromHandle function | The gflLoadBitmapFromHandle function loads a picture into memory with the use of read callback functions. | ||
GFL_ERROR gflLoadBitmapFromHandle( | GFL_ERROR <b>gflLoadBitmapFromHandle</b>( | ||
GFL_HANDLE handle, | |||
GFL_BITMAP** bitmap, | |||
const GFL_LOAD_PARAMS* params, | |||
GFL_FILE_INFORMATION* informations, | |||
); | ); | ||
Line 109: | Line 110: | ||
'''See also''' | '''See also''' | ||
:[[#gflGetDefaultLoadParams|gflGetDefaultLoadParams]], [[#gflLoadBitmap|gflLoadBitmap]], [[#gflLoadBitmapFromMemory|gflLoadBitmapFromMemory]] | :[[#gflGetDefaultLoadParams|gflGetDefaultLoadParams]], [[#gflLoadBitmap|gflLoadBitmap]], [[#gflLoadBitmapFromMemory|gflLoadBitmapFromMemory]] | ||
== gflGetDefaultThumbnailParams== | == gflGetDefaultThumbnailParams== | ||
The gflGetDefaultThumbnailParams function sets the [[Structures#GFL_LOAD_PARAMS|GFL_LOAD_PARAMS]] structure with default values. | The gflGetDefaultThumbnailParams function sets the [[Structures#GFL_LOAD_PARAMS|GFL_LOAD_PARAMS]] structure with default values. Must be called before gflGetDefaultThumbnail*. | ||
void gflGetDefaultThumbnailParams( | void <b>gflGetDefaultThumbnailParams</b>( | ||
GFL_LOAD_PARAMS* load_params | |||
); | ); | ||
Line 130: | Line 130: | ||
== gflLoadThumbnail == | == gflLoadThumbnail == | ||
The gflLoadThumbnail function | The gflLoadThumbnail function loads a picture file as a thumbnail into memory. | ||
GFL_ERROR gflLoadThumbnail( | GFL_ERROR <b>gflLoadThumbnail</b>( | ||
const char* filename, | |||
GFL_INT32 width, | |||
GFL_INT32 height, | |||
GFL_BITMAP** bitmap, | |||
const GFL_LOAD_PARAMS* params, | |||
GFL_FILE_INFORMATION* informations, | |||
); | ); | ||
Line 160: | Line 160: | ||
'''Return value''' | '''Return value''' | ||
:The function returns GFL_NO_ERROR if it is successful or a value of [[Error|GFL_ERROR]]. | :The function returns GFL_NO_ERROR if it is successful or a value of [[Error|GFL_ERROR]]. | ||
'''Remark''' | |||
:gflLoadThumbnailW exists for the windows unicode version of GFLSDK | |||
'''See also''' | '''See also''' | ||
:[[#gflGetDefaultThumbnailParams|gflGetDefaultThumbnailParams]], [[#gflLoadThumbnailFromHandle|gflLoadThumbnailFromHandle]], [[#gflLoadThumbnailFromMemory|gflLoadThumbnailFromMemory]] | :[[#gflGetDefaultThumbnailParams|gflGetDefaultThumbnailParams]], [[#gflLoadThumbnailFromHandle|gflLoadThumbnailFromHandle]], [[#gflLoadThumbnailFromMemory|gflLoadThumbnailFromMemory]] | ||
== gflLoadThumbnailFromMemory == | == gflLoadThumbnailFromMemory == | ||
The gflLoadThumbnailFromMemory function | The gflLoadThumbnailFromMemory function loads a picture file as a thumbnail from memory. | ||
GFL_ERROR gflLoadThumbnailFromMemory( | GFL_ERROR <b>gflLoadThumbnailFromMemory</b>( | ||
const GFL_UINT8* data, | |||
GFL_UINT32 data_length, | |||
GFL_INT32 width, | |||
GFL_INT32 height, | |||
GFL_BITMAP** bitmap, | |||
const GFL_LOAD_PARAMS* params, | |||
GFL_FILE_INFORMATION* informations, | |||
); | ); | ||
Line 203: | Line 205: | ||
'''See also''' | '''See also''' | ||
:[[#gflGetDefaultThumbnailParams|gflGetDefaultThumbnailParams]], [[#gflLoadThumbnail|gflLoadThumbnail]], [[#gflLoadThumbnailFromHandle|gflLoadThumbnailFromHandle]] | :[[#gflGetDefaultThumbnailParams|gflGetDefaultThumbnailParams]], [[#gflLoadThumbnail|gflLoadThumbnail]], [[#gflLoadThumbnailFromHandle|gflLoadThumbnailFromHandle]] | ||
== gflLoadThumbnailFromHandle == | == gflLoadThumbnailFromHandle == | ||
The gflLoadThumbnailFromHandle function | The gflLoadThumbnailFromHandle function loads a picture file as a thumbnail into memory with the use of read callback functions. | ||
GFL_ERROR gflLoadThumbnailFromHandle( | GFL_ERROR <b>gflLoadThumbnailFromHandle</b>( | ||
GFL_HANDLE handle, | |||
GFL_INT32 width, | |||
GFL_INT32 height, | |||
GFL_BITMAP** bitmap, | |||
const GFL_LOAD_PARAMS* params, | |||
GFL_FILE_INFORMATION* informations, | |||
); | ); | ||
Line 240: | Line 241: | ||
'''See also''' | '''See also''' | ||
:[[#gflGetDefaultThumbnailParams|gflGetDefaultThumbnailParams]], [[#gflLoadThumbnail|gflLoadThumbnail]], [[#gflLoadThumbnailFromMemory|gflLoadThumbnailFromMemory]] | :[[#gflGetDefaultThumbnailParams|gflGetDefaultThumbnailParams]], [[#gflLoadThumbnail|gflLoadThumbnail]], [[#gflLoadThumbnailFromMemory|gflLoadThumbnailFromMemory]] | ||
== gflGetFileInformation == | == gflGetFileInformation == | ||
Line 246: | Line 246: | ||
The gflGetFileInformation function retrieves all informations about a picture file. | The gflGetFileInformation function retrieves all informations about a picture file. | ||
GFL_ERROR gflGetFileInformation( | GFL_ERROR <b>gflGetFileInformation</b>( | ||
const char* filename, | |||
GFL_INT32 index, | |||
GFL_FILE_INFORMATION* information | |||
); | ); | ||
Line 264: | Line 264: | ||
'''Return value''' | '''Return value''' | ||
:The function returns GFL_NO_ERROR if it is successful or a value of [[Error|GFL_ERROR]]. | :The function returns GFL_NO_ERROR if it is successful or a value of [[Error|GFL_ERROR]]. | ||
'''Remark''' | |||
:gflGetFileInformationW exists for the windows unicode version of GFLSDK | |||
'''See also''' | '''See also''' | ||
:[[#gflGetFileInformationFromMemory|gflGetFileInformationFromMemory]], [[#gflGetFileInformationFromHandle|gflGetFileInformationFromHandle]] | :[[#gflGetFileInformationFromMemory|gflGetFileInformationFromMemory]], [[#gflGetFileInformationFromHandle|gflGetFileInformationFromHandle]] | ||
== gflGetFileInformationFromMemory == | == gflGetFileInformationFromMemory == | ||
Line 273: | Line 275: | ||
The gflGetFileInformationFromMemory function retrieves all informations about a picture from memory. | The gflGetFileInformationFromMemory function retrieves all informations about a picture from memory. | ||
GFL_ERROR gflGetFileInformationFromMemory( | GFL_ERROR <b>gflGetFileInformationFromMemory</b>( | ||
const GFL_UINT8* data, | |||
GFL_UINT32 data_length, | |||
GFL_INT32 index, | |||
GFL_FILE_INFORMATION* information | |||
); | ); | ||
Line 297: | Line 299: | ||
'''See also''' | '''See also''' | ||
:[[#gflGetFileInformation|gflGetFileInformation]], [[#gflGetFileInformationFromHandle|gflGetFileInformationFromHandle]] | :[[#gflGetFileInformation|gflGetFileInformation]], [[#gflGetFileInformationFromHandle|gflGetFileInformationFromHandle]] | ||
== gflGetFileInformationFromHandle == | == gflGetFileInformationFromHandle == | ||
Line 303: | Line 304: | ||
The gflGetFileInformationFromHandle function retrieves all informations about a picture with the use of read callback functions. | The gflGetFileInformationFromHandle function retrieves all informations about a picture with the use of read callback functions. | ||
GFL_ERROR gflGetFileInformationFromHandle( | GFL_ERROR <b>gflGetFileInformationFromHandle</b>( | ||
GFL_HANDLE handle, | |||
GFL_INT32 index, | |||
const GFL_LOAD_CALLBACKS* callbacks, | |||
GFL_FILE_INFORMATION* information | |||
); | ); | ||
Line 317: | Line 318: | ||
::Index of format. -1 for automatic recognition. | ::Index of format. -1 for automatic recognition. | ||
:callbacks | :callbacks | ||
:: | ::Pointer to a [[Structures#GFL_LOAD_CALLBACKS|GFL_LOAD_CALLBACKS]] to access picture data. | ||
:information | :information | ||
::Pointer to a [[Structures#GFL_FILE_INFORMATION|GFL_FILE_INFORMATION]] structure. | ::Pointer to a [[Structures#GFL_FILE_INFORMATION|GFL_FILE_INFORMATION]] structure. | ||
Line 327: | Line 328: | ||
'''See also''' | '''See also''' | ||
:[[#gflGetFileInformation|gflGetFileInformation]], [[#gflGetFileInformationFromMemory|gflGetFileInformationFromMemory]] | :[[#gflGetFileInformation|gflGetFileInformation]], [[#gflGetFileInformationFromMemory|gflGetFileInformationFromMemory]] | ||
== gflFreeFileInformation == | == gflFreeFileInformation == | ||
Line 333: | Line 333: | ||
The gflFreeFileInformation function frees the content of a GFL_FILE_INFORMATION structure. | The gflFreeFileInformation function frees the content of a GFL_FILE_INFORMATION structure. | ||
void gflFreeFileInformation( | void <b>gflFreeFileInformation</b>( | ||
GFL_FILE_INFORMATION* information | |||
); | ); | ||
'''Parameters''' | '''Parameters''' | ||
: | :information | ||
::Pointer to a [[Structures#GFL_FILE_INFORMATION|GFL_FILE_INFORMATION]] structure. | ::Pointer to a [[Structures#GFL_FILE_INFORMATION|GFL_FILE_INFORMATION]] structure. | ||
'''See also''' | '''See also''' | ||
:[[#gflLoadBitmap|gflLoadBitmap]], [[#gflLoadBitmapFromMemory|gflLoadBitmapFromMemory]], [[#gflLoadBitmapFromHandle|gflLoadBitmapFromHandle]], [[#gflGetFileInformation|gflGetFileInformation]], [[#gflGetFileInformationFromHandle|gflGetFileInformationFromHandle]], [[#gflGetFileInformationFromMemory|gflGetFileInformationFromMemory]] | :[[#gflLoadBitmap|gflLoadBitmap]], [[#gflLoadBitmapFromMemory|gflLoadBitmapFromMemory]], [[#gflLoadBitmapFromHandle|gflLoadBitmapFromHandle]], [[#gflGetFileInformation|gflGetFileInformation]], [[#gflGetFileInformationFromHandle|gflGetFileInformationFromHandle]], [[#gflGetFileInformationFromMemory|gflGetFileInformationFromMemory]] | ||
[[Category: GFLSDK Reference Manual]] |
Latest revision as of 18:19, 27 April 2010
gflGetDefaultLoadParams
The gflGetDefaultLoadParams function sets the GFL_LOAD_PARAMS structure with default values. Must be called before gflLoadBitmap*.
void gflGetDefaultLoadParams( GFL_LOAD_PARAMS* load_params );
Parameters
- load_params
- Pointer to a GFL_LOAD_PARAMS structure.
See also
gflLoadBitmap
The gflLoadBitmap function loads a picture file into memory.
GFL_ERROR gflLoadBitmap( const char* filename, GFL_BITMAP** bitmap, const 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 gflFreeFileInformation to free his content.
Return value
- The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
Remark
- gflLoadBitmapW exists for the windows unicode version of GFLSDK
See also
gflLoadBitmapFromMemory
The gflLoadBitmapFromMemory function loads a picture from memory.
GFL_ERROR gflLoadBitmapFromMemory( const GFL_UINT8* data, GFL_UINT32 data_length, GFL_BITMAP** bitmap, const 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 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
gflLoadBitmapFromHandle
The gflLoadBitmapFromHandle function loads a picture into memory with the use of read callback functions.
GFL_ERROR gflLoadBitmapFromHandle( GFL_HANDLE handle, GFL_BITMAP** bitmap, const 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 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
gflGetDefaultThumbnailParams
The gflGetDefaultThumbnailParams function sets the GFL_LOAD_PARAMS structure with default values. Must be called before gflGetDefaultThumbnail*.
void gflGetDefaultThumbnailParams( GFL_LOAD_PARAMS* load_params );
Parameters
- load_params
- Pointer to a GFL_LOAD_PARAMS structure.
See also
gflLoadThumbnail
The gflLoadThumbnail function loads a picture file as a thumbnail into memory.
GFL_ERROR gflLoadThumbnail( const char* filename, GFL_INT32 width, GFL_INT32 height, GFL_BITMAP** bitmap, const 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 gflFreeFileInformation to free his content.
Return value
- The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
Remark
- gflLoadThumbnailW exists for the windows unicode version of GFLSDK
See also
gflLoadThumbnailFromMemory
The gflLoadThumbnailFromMemory function loads a picture file as a thumbnail from memory.
GFL_ERROR gflLoadThumbnailFromMemory( const GFL_UINT8* data, GFL_UINT32 data_length, GFL_INT32 width, GFL_INT32 height, GFL_BITMAP** bitmap, const 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
gflLoadThumbnailFromHandle
The gflLoadThumbnailFromHandle function loads 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, const 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
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.
Remark
- gflGetFileInformationW exists for the windows unicode version of GFLSDK
See also
gflGetFileInformationFromMemory
The gflGetFileInformationFromMemory function retrieves all informations about a picture from memory.
GFL_ERROR gflGetFileInformationFromMemory( const 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
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
- Pointer to a GFL_LOAD_CALLBACKS 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
gflFreeFileInformation
The gflFreeFileInformation function frees the content of a GFL_FILE_INFORMATION structure.
void gflFreeFileInformation( GFL_FILE_INFORMATION* information );
Parameters
- information
- Pointer to a GFL_FILE_INFORMATION structure.
See also