Difference between revisions of "Write"
From XnView Wiki
(8 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
The gflGetDefaultSaveParams function sets the [[#GFL_SAVE_PARAMS|GFL_SAVE_PARAMS]] structure with default values. To use before call of gflSaveBitmap. | The gflGetDefaultSaveParams function sets the [[#GFL_SAVE_PARAMS|GFL_SAVE_PARAMS]] structure with default values. To use before call of gflSaveBitmap. | ||
void gflGetDefaultSaveParams( | void <b>gflGetDefaultSaveParams</b>( | ||
GFL_SAVE_PARAMS* save_params | |||
); | ); | ||
Line 20: | Line 20: | ||
The gflSaveBitmap function save a picture in memory into a file. | The gflSaveBitmap function save a picture in memory into a file. | ||
GFL_ERROR gflSaveBitmap( | GFL_ERROR <b>gflSaveBitmap</b>( | ||
char* filename, | |||
const GFL_BITMAP* bitmap, | |||
const GFL_SAVE_PARAMS* params, | |||
); | ); | ||
Line 38: | Line 38: | ||
'''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''' | |||
:gflSaveBitmapW exists for the windows unicode version of GFLSDK | |||
'''See also''' | '''See also''' | ||
:[[#gflGetDefaultSaveParams|gflGetDefaultSaveParams]], [[#gflSaveBitmapIntoMemory|gflSaveBitmapIntoMemory]], [[#gflSaveBitmapIntoHandle|gflSaveBitmapIntoHandle]] | :[[#gflGetDefaultSaveParams|gflGetDefaultSaveParams]], [[#gflSaveBitmapIntoMemory|gflSaveBitmapIntoMemory]], [[#gflSaveBitmapIntoHandle|gflSaveBitmapIntoHandle]] | ||
== gflSaveBitmapIntoMemory == | == gflSaveBitmapIntoMemory == | ||
The gflSaveBitmapIntoMemory function save a picture | The gflSaveBitmapIntoMemory function save a picture into memory. | ||
GFL_ERROR gflSaveBitmapIntoMemory ( | GFL_ERROR <b>gflSaveBitmapIntoMemory</b>( | ||
GFL_UINT8** data, | |||
GFL_UINT32* data_length, | |||
const GFL_BITMAP* bitmap, | |||
const GFL_SAVE_PARAMS* params, | |||
); | ); | ||
Line 70: | Line 72: | ||
'''See also''' | '''See also''' | ||
:[[#gflGetDefaultSaveParams|gflGetDefaultSaveParams]], [[#gflSaveBitmap|gflSaveBitmap]], [[# | :[[#gflGetDefaultSaveParams|gflGetDefaultSaveParams]], [[#gflSaveBitmap|gflSaveBitmap]], [[#gflSaveBitmapIntoHandle|gflSaveBitmapIntoHandle]] | ||
== gflSaveBitmapIntoHandle == | == gflSaveBitmapIntoHandle == | ||
Line 77: | Line 78: | ||
The gflSaveBitmapIntoHandle function save a picture in memory into a file with the use of write callback functions. | The gflSaveBitmapIntoHandle function save a picture in memory into a file with the use of write callback functions. | ||
GFL_ERROR gflSaveBitmapIntoHandle( | GFL_ERROR <b>gflSaveBitmapIntoHandle</b>( | ||
GFL_HANDLE handle, | |||
const GFL_BITMAP* bitmap, | |||
const GFL_SAVE_PARAMS* params, | |||
); | ); | ||
Line 98: | Line 99: | ||
'''See also''' | '''See also''' | ||
:[[#gflGetDefaultSaveParams|gflGetDefaultSaveParams]], [[#gflSaveBitmap|gflSaveBitmap]], [[#gflSaveBitmapIntoMemory|gflSaveBitmapIntoMemory]] | :[[#gflGetDefaultSaveParams|gflGetDefaultSaveParams]], [[#gflSaveBitmap|gflSaveBitmap]], [[#gflSaveBitmapIntoMemory|gflSaveBitmapIntoMemory]] | ||
== gflFileCreate == | == gflFileCreate == | ||
Line 104: | Line 104: | ||
The gflFileCreate function creates a multi-page file. | The gflFileCreate function creates a multi-page file. | ||
GFL_ERROR gflFileCreate( | GFL_ERROR <b>gflFileCreate</b>( | ||
GFL_FILE_HANDLE* handle, | |||
const char* filename, | |||
GFL_UINT32 image_count, | |||
const GFL_SAVE_PARAMS* params | |||
); | ); | ||
Line 128: | Line 128: | ||
'''See also''' | '''See also''' | ||
:[[#gflFileAddPicture|gflFileAddPicture]], [[#gflFileClose |gflFileClose ]] | :[[#gflFileAddPicture|gflFileAddPicture]], [[#gflFileClose |gflFileClose ]] | ||
== gflFileAddPicture == | == gflFileAddPicture == | ||
Line 134: | Line 133: | ||
The gflFileAddPicture function add a picture to a multi-page file. | The gflFileAddPicture function add a picture to a multi-page file. | ||
GFL_ERROR gflFileAddPicture( | GFL_ERROR <b>gflFileAddPicture(</b> | ||
GFL_FILE_HANDLE handle, | |||
const GFL_BITMAP* bitmap | |||
); | ); | ||
Line 157: | Line 156: | ||
The gflFileClose function closes a multi-page file. | The gflFileClose function closes a multi-page file. | ||
void gflFileClose( | void <b>gflFileClose</b>( | ||
GFL_FILE_HANDLE handle | |||
); | ); | ||
Line 168: | Line 167: | ||
'''See also''' | '''See also''' | ||
:[[#gflFileCreate|gflFileCreate]], [[#gflFileAddPicture|gflFileAddPicture]] | :[[#gflFileCreate|gflFileCreate]], [[#gflFileAddPicture|gflFileAddPicture]] | ||
[[Category: GFLSDK Reference Manual]] |
Latest revision as of 18:19, 27 April 2010
gflGetDefaultSaveParams
The gflGetDefaultSaveParams function sets the GFL_SAVE_PARAMS structure with default values. To use before call of gflSaveBitmap.
void gflGetDefaultSaveParams( GFL_SAVE_PARAMS* save_params );
Parameters
- save_params
- Pointer to a GFL_SAVE_PARAMS structure.
See also
gflSaveBitmap
The gflSaveBitmap function save a picture in memory into a file.
GFL_ERROR gflSaveBitmap( char* filename, const GFL_BITMAP* bitmap, const GFL_SAVE_PARAMS* params, );
Parameters
- filename
- Pointer to a null-terminated string that contains the filename to save.
- bitmap
- Pointer to a GFL_BITMAP structure.
- params
- Pointer to a GFL_SAVE_PARAMS structure.
- This structure must be filled correctly, in particular the FormatIndex field.
Return value
- The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
Remark
- gflSaveBitmapW exists for the windows unicode version of GFLSDK
See also
gflSaveBitmapIntoMemory
The gflSaveBitmapIntoMemory function save a picture into memory.
GFL_ERROR gflSaveBitmapIntoMemory( GFL_UINT8** data, GFL_UINT32* data_length, const GFL_BITMAP* bitmap, const GFL_SAVE_PARAMS* params, );
Parameters
- data
- Address of a pointer for allocated data
- data_length
- Pointer for the final length of data
- bitmap
- Address of a pointer to a GFL_BITMAP structure.
- params
- Pointer to a GFL_SAVE_PARAMS structure.
- This structure must be filled correctly, in particular the FormatIndex field.
Return value
- The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
See also
gflSaveBitmapIntoHandle
The gflSaveBitmapIntoHandle function save a picture in memory into a file with the use of write callback functions.
GFL_ERROR gflSaveBitmapIntoHandle( GFL_HANDLE handle, const GFL_BITMAP* bitmap, const GFL_SAVE_PARAMS* params, );
Parameters
- handle
- User handle. The Callbacks field of the GFL_SAVE_PARAMS structure must be filled correctly.
- bitmap
- Address of a pointer to a GFL_BITMAP structure.
- params
- Pointer to a GFL_SAVE_PARAMS structure.
- This structure must be filled correctly, in particular the FormatIndex field.
Return value
- The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
See also
gflFileCreate
The gflFileCreate function creates a multi-page file.
GFL_ERROR gflFileCreate( GFL_FILE_HANDLE* handle, const char* filename, GFL_UINT32 image_count, const GFL_SAVE_PARAMS* params );
Parameters
- handle
- Address of an handle.
- filename
- Pointer to a null-terminated string that contains the filename to create.
- image_count
- Number of picture to be added.
- params
- Pointer to a GFL_SAVE_PARAMS structure.
- This structure must be filled correctly.
Return value
- The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
See also
gflFileAddPicture
The gflFileAddPicture function add a picture to a multi-page file.
GFL_ERROR gflFileAddPicture( GFL_FILE_HANDLE handle, const GFL_BITMAP* bitmap );
Parameters
- handle
- Handle of the file.
- bitmap
- Pointer to a GFL_BITMAP structure. This is the picture to add.
Return value
- The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
See also
gflFileClose
The gflFileClose function closes a multi-page file.
void gflFileClose( GFL_FILE_HANDLE handle );
Parameters
- handle
- Handle of file.
See also