Skip to content

Latest commit

 

History

History
66 lines (44 loc) · 1.44 KB

GdipSaveImageToFile.md

File metadata and controls

66 lines (44 loc) · 1.44 KB

Home

Function name : GdipSaveImageToFile

Group: GDI+ Image - Library: gdiplus


Saves this image to a file.


Code examples:

Custom GDI+ class

Declaration:

GpStatus WINGDIPAPI GdipSaveImageToFile(
	GpImage *image,
	GDIPCONST WCHAR* filename,
	GDIPCONST CLSID* clsidEncoder,
	GDIPCONST EncoderParameters* encoderParams
)
  

FoxPro declaration:

DECLARE INTEGER GdipSaveImageToFile IN gdiplus;
	INTEGER img,;
	STRING  filename,;
	STRING  clsidEncoder,;
	INTEGER encoderParams
  

Parameters:

img [in] Handle to Image Object

filename [in] Pointer to a null-terminated string that specifies the path name for the saved image.

clsidEncoder [in] Pointer to a CLSID that specifies the encoder to use to save the image.

encoderParams [in] Optional. Pointer to an EncoderParameters object that holds parameters used by the encoder. The default value is NULL.


Return value:

Returns GpStatus value, 0 means success.


Comments:

The technique of constructing a Graphics object based on an image works only for certain image formats. For example, you cannot construct a Graphics object based on an image that has a color depth of 4 bits per pixel.

GDI+ does not allow you to save an image to the same file that you used to construct the image.