Saves an image to file
#include <ScreenCapture.au3>
_ScreenCapture_SaveImage ( $sFileName, $hBitmap [, $bFreeBmp = True] )
$sFileName | Full path and extension of the bitmap file to be saved |
$hBitmap | HBITMAP handle |
$bFreeBmp | [optional] If True, $hBitmap will be freed on a successful save (default) |
Success: | True. |
Failure: | False. |
This function saves a bitmap to file, converting it to the image format specified by the file name extension.
For Windows XP, the valid extensions are BMP, GIF, JPEG, PNG and TIF.
#include <ScreenCapture.au3>
Example()
Func Example()
Local $hBmp
; Capture full screen
$hBmp = _ScreenCapture_Capture("")
; Save bitmap to file
_ScreenCapture_SaveImage(@MyDocumentsDir & "\GDIPlus_Image.jpg", $hBmp)
ShellExecute(@MyDocumentsDir & "\GDIPlus_Image.jpg")
EndFunc ;==>Example