Save a floating-point map as a HF2/HFZ file.
long hfzSave(const char* lpFileName, long Format, hfzHeader& fh, float* pData, LIBHFZ_PROG_CALLBACK lpProgCallback, void* lpCallbackParam);
Name | Type | Comment |
---|---|---|
lpFileName | const char* | The file name of the file to be saved. |
Format | long | The type of file to be opened. May be either LIBHFZ_FORMAT_HF2 (uncompressed) or LIBHFZ_FORMAT_HF2_GZ (compressed). |
fh | hfzHeader& | The hfzHeader struct to be written to the file, as initialised by hfzHeader_Init. |
pData | float* | A handle to the map data. Please refer to the HF2 file specification for the required pixel order. |
lpProgCallback | LIBHFZ_PROG_CALLBACK | A handle to a callback function for displaying progress (see comments below). May be NULL if no callback is desired. |
lpCallbackParam | void* | A handle to a user-defined parameter to be passed back to the lpProgCallback function, if used. |
LIBHFZ_STATUS_OK if the file was saved successfully, and otherwise an error code. Use hfzGetErrorStr to retrieve the error description.
The prototype of the callback function must be:
long __stdcall MyCallbackFuncName(float Progress);
The value of Progress passed by LibHFZ varies from 0 to 1.
The value returned by the callback must be: