Saves the image found:
- in an Image Editor control.
- in a variable of type WDPic.
// Request to save the image found in an Image Editor control
IF PicSave(IE_MyEditor) = False THEN
MyWDPicImage is WDPic
// Asks to save the image
IF PicSave(MyWDPicImage, "C:\temp\test.png") = False THEN
<Result> = PicSave(<Image> [, <File>])
- True if the image was created,
- False otherwise (error, cancelation of file picker, ...). If an error occurs, ErrorOccurred is set to True and ErrorInfo returns the details of the error.
<Image>: Control name or WDPic variable
Image to save. The image can correspond to:
- the name of the Image Editor to use.
- the name of the WDPic variable to use.
<File>: Optional character string
Name and path of the image file to save. The file extension defines the type of image to save.
If this parameter is not specified:
- For an Image Editor control: the action performed corresponds to the save feature of the image editor (diskette icon in the ribbon).
If the image was never saved, the file picker is displayed.
- For a variable of type WDPic , a fatal error is displayed.
Unit examples (WINDEV): WDPic type
Business / UI classification: UI Code