Actions

Difference between revisions of "Write"

From XnView Wiki

(Created page with 'gflGetDefaultSaveParams The gflGetDefaultSaveParams function sets the GFL_SAVE_PARAMS structure with default values. To use before call of gflSaveBitmap. void gflGetDefaultSa…')
 
Line 1: Line 1:
gflGetDefaultSaveParams
== gflGetDefaultSaveParams ==


The gflGetDefaultSaveParams function sets the 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(
 GFL_SAVE_PARAMS* save_params
);


void gflGetDefaultSaveParams(
'''Parameters'''
  GFL_SAVE_PARAMS * save_params
);


Parameters
:save_params
::Pointer to a [[#GFL_SAVE_PARAMS|GFL_SAVE_PARAMS]] structure.


save_params
'''See also'''
Pointer to a GFL_SAVE_PARAMS structure.
:[[#gflSaveBitmap|gflSaveBitmap]], [[#gflSaveBitmapIntoHandle|gflSaveBitmapIntoHandle]], [[#gflSaveBitmapIntoMemory|gflSaveBitmapIntoMemory]]


See also


gflGetDefaultLoadParams, gflGetDefaultThumbnailParams, gflSaveBitmap, gflSaveBitmapIntoHandle
== gflSaveBitmap ==
 
 
gflSaveBitmap


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(
 char* filename, 
 const GFL_BITMAP* bitmap, 
 GFL_SAVE_PARAMS* params, 
);


GFL_ERROR gflSaveBitmap(
'''Parameters'''
  char * filename, 
  const GFL_BITMAP * bitmap, 
  GFL_SAVE_PARAMS * params, 
);


Parameters
:filename
::Pointer to a null-terminated string that contains the filename to save.
:bitmap
::Pointer to a [[#GFL_BITMAP|GFL_BITMAP]] structure.
:params
::Pointer to a [[#GFL_SAVE_PARAMS|GFL_SAVE_PARAMS]] structure.
::This structure must be filled correctly, in particular the FormatIndex field.


filename
'''Return value'''
Pointer to a null-terminated string that contains the filename to save.
:The function returns GFL_NO_ERROR if it is successful or a value of [[Error|GFL_ERROR]].  
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
'''See also'''
:[[#gflGetDefaultSaveParams|gflGetDefaultSaveParams]], [[#gflSaveBitmapIntoMemory|gflSaveBitmapIntoMemory]], [[#gflSaveBitmapIntoHandle|gflSaveBitmapIntoHandle]]


The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.


== gflSaveBitmapIntoMemory ==


See also
The gflSaveBitmapIntoMemory function save a picture in memory into a file with the use of write callback functions.


gflGetDefaultLoadParams, gflGetDefaultThumbnailParams, gflGetDefaultSaveParams, gflLoadBitmap, gflLoadBitmapFromMemory, gflLoadBitmapFromHandle, gflLoadThumbnail, gflLoadThumbnailFromMemory, gflLoadThumbnailFromHandle, gflSaveBitmapIntoMemory, gflSaveBitmapIntoHandle
GFL_ERROR gflSaveBitmapIntoMemory (
 GFL_UINT8** data,  
 GFL_UINT32* data_length,  
 const GFL_BITMAP* bitmap,
 GFL_SAVE_PARAMS* params,
);


'''Parameters'''


gflSaveBitmapIntoHandle
: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|GFL_BITMAP]] structure.
:params
::Pointer to a [[#GFL_SAVE_PARAMS|GFL_SAVE_PARAMS]] structure.
::This structure must be filled correctly, in particular the FormatIndex field.


The gflSaveBitmapIntoHandle function save a picture in memory into a file with the use of write callback functions.  
'''Return value'''
:The function returns GFL_NO_ERROR if it is successful or a value of [[Error|GFL_ERROR]].  


'''See also'''
:[[#gflGetDefaultSaveParams|gflGetDefaultSaveParams]], [[#gflSaveBitmap|gflSaveBitmap]], [[#gflSaveBitmapIntoMemory|gflSaveBitmapIntoMemory]]


GFL_ERROR gflSaveBitmapIntoHandle(
  GFL_HANDLE handle, 
  const GFL_BITMAP * bitmap, 
  GFL_SAVE_PARAMS * params, 
);


Parameters
== gflSaveBitmapIntoHandle ==


handle
The gflSaveBitmapIntoHandle function save a picture in memory into a file with the use of write callback functions.  
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
GFL_ERROR gflSaveBitmapIntoHandle(
 GFL_HANDLE handle, 
 const GFL_BITMAP* bitmap, 
 GFL_SAVE_PARAMS* params, 
);


The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.
'''Parameters'''


:handle
::User handle. The Callbacks field of the [[#GFL_SAVE_PARAMS|GFL_SAVE_PARAMS]] structure must be filled correctly.
:bitmap
::Address of a pointer to a [[#GFL_BITMAP|GFL_BITMAP]] structure.
:params
::Pointer to a [[#GFL_SAVE_PARAMS|GFL_SAVE_PARAMS]] structure.
::This structure must be filled correctly, in particular the FormatIndex field.


See also
'''Return value'''
:The function returns GFL_NO_ERROR if it is successful or a value of [[Error|GFL_ERROR]].


gflGetDefaultLoadParams, gflGetDefaultThumbnailParams, gflGetDefaultSaveParams, gflLoadBitmap, gflLoadBitmapFromMemory, gflLoadBitmapFromHandle, gflLoadThumbnail, gflLoadThumbnailFromMemory, gflLoadThumbnailFromHandle, gflSaveBitmapIntoMemory, gflSaveBitmap
'''See also'''
:[[#gflGetDefaultSaveParams|gflGetDefaultSaveParams]], [[#gflSaveBitmap|gflSaveBitmap]], [[#gflSaveBitmapIntoMemory|gflSaveBitmapIntoMemory]]




gflFileCreate
== gflFileCreate ==


The gflFileCreate function creates a multi-page file.  
The gflFileCreate function creates a multi-page file.  


GFL_ERROR gflFileCreate(
 GFL_FILE_HANDLE* handle, 
 const char* filename, 
 GFL_UINT32 image_count, 
 GFL_SAVE_PARAMS* params
);


GFL_ERROR gflFileCreate(
'''Parameters'''
  GFL_FILE_HANDLE * handle, 
  const char * filename, 
  GFL_UINT32 image_count, 
  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|GFL_SAVE_PARAMS]] structure.
::This structure must be filled correctly.


handle
'''Return value'''
Address of an handle.
:The function returns GFL_NO_ERROR if it is successful or a value of [[Error|GFL_ERROR]].  
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
'''See also'''
:[[#gflFileAddPicture|gflFileAddPicture]], [[#gflFileClose |gflFileClose ]]


The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.


 
== gflFileAddPicture ==
See also
 
gflFileAddPicture, gflFileClose
 
gflFileAddPicture


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_FILE_HANDLE  handle, 
 const GFL_BITMAP* bitmap
);


GFL_ERROR gflFileAddPicture(
'''Parameters'''
  GFL_FILE_HANDLE  handle, 
  const GFL_BITMAP * bitmap
);


Parameters
:handle
::Handle of the file.
:bitmap
::Pointer to a [[#GFL_BITMAP|GFL_BITMAP]] structure. This is the picture to add.


handle
'''Return value'''
Handle of the file.
:The function returns GFL_NO_ERROR if it is successful or a value of [[Error|GFL_ERROR]].  
bitmap
Pointer to a GFL_BITMAP structure. This is the picture to add.  


Return value
'''See also'''
:[[#gflFileCreate|gflFileCreate]], [[#gflFileClose |gflFileClose ]]


The function returns GFL_NO_ERROR if it is successful or a value of GFL_ERROR.


 
== gflFileClose ==
See also
 
gflFileCreate, gflFileClose
 
 
gflFileClose


The gflFileClose function closes a multi-page file.  
The gflFileClose function closes a multi-page file.  


void gflFileClose(
 GFL_FILE_HANDLE handle
);


void gflFileClose(
'''Parameters'''
  GFL_FILE_HANDLE  handle
);
 
Parameters  
 
handle
Handle of file.


See also
:handle
::Handle of file.


gflFileCreate, gflFileAddPicture
'''See also'''
:[[#gflFileCreate|gflFileCreate]], [[#gflFileAddPicture|gflFileAddPicture]]

Revision as of 09:56, 23 September 2009

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, gflSaveBitmapIntoHandle, gflSaveBitmapIntoMemory


gflSaveBitmap

The gflSaveBitmap function save a picture in memory into a file.

GFL_ERROR gflSaveBitmap(
 char* filename,  
 const GFL_BITMAP* bitmap,  
 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.

See also

gflGetDefaultSaveParams, gflSaveBitmapIntoMemory, gflSaveBitmapIntoHandle


gflSaveBitmapIntoMemory

The gflSaveBitmapIntoMemory function save a picture in memory into a file with the use of write callback functions.

GFL_ERROR gflSaveBitmapIntoMemory (
 GFL_UINT8** data, 
 GFL_UINT32* data_length, 
 const GFL_BITMAP* bitmap,  
 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

gflGetDefaultSaveParams, gflSaveBitmap, gflSaveBitmapIntoMemory


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,  
 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

gflGetDefaultSaveParams, gflSaveBitmap, gflSaveBitmapIntoMemory


gflFileCreate

The gflFileCreate function creates a multi-page file.

GFL_ERROR gflFileCreate(
 GFL_FILE_HANDLE* handle,  
 const char* filename,  
 GFL_UINT32 image_count,  
 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, gflFileClose


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

gflFileCreate, gflFileClose


gflFileClose

The gflFileClose function closes a multi-page file.

void gflFileClose(
 GFL_FILE_HANDLE handle
);

Parameters

handle
Handle of file.

See also

gflFileCreate, gflFileAddPicture