08-04-2017, 07:43 PM
Is it possible to modify the below example to get the clipboard contents which is bitmap and then convert it to JPG?
Macro Macro16
Macro Macro16
;file
str sFile="$desktop$\qm test jpg gdip.jpg"
;________________________
;capture to memory
__GdiHandle hb
CaptureImageOnScreen(0 0 ScreenWidth ScreenHeight "" hb)
;save as png
#compile "__Gdip"
GdipBitmap im
if(!im.FromHBITMAP(hb)) end "error"
if(!im.Save(sFile)) end "error"
;________________________
;show the image
run sFile