Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Image capture format
#8
no 

find dialog only captures bitmaps only

you will need to use a different capture function than the 1 built into find image dialog

You could add a toolbar to the window to launch the function easier

but would still need add as a resource the newly captured png image

   


example code

Toolbar Toolbar1
Trigger !a"Find Image" "#32770" /QM     Help - how to add the trigger to the macro
Code:
Copy      Help
;/mov 190 115 /siz 85 21 /isiz 0 0 /bsiz 87 /set 1|2|32|0x4000 /transp "" b
Capture Png :mac "CaptureImageSaveAsPng"

Function CaptureImageSaveAsPng
Code:
Copy      Help
RECT r
__GdiHandle hb
if(!CaptureImageOrColor(hb 0 _hwndqm "" r)) ret
mkdir "QM_CaptureImages" "$desktop$";;create folder if it doesnt exist to save images in
str sFolderName = "$desktop$\QM_CaptureImages\"
str sFileName.timeformat("{yyyy-MM-dd}_{HH-mm-ss}_QmCapture");;unique filename to avoid problems
str sFormat = ".png";;i use png for smaller filesize
str sFile.format("%s%s%s" sFolderName sFileName sFormat)
;save image
#compile "__Gdip"
GdipBitmap im
if(!im.FromHBITMAP(hb)) end "error"
if(!im.Save(sFile)) end "error"
out sFile
0.2
int w=win("Find Image" "#32770")
int c=id(5 w) ;;push button 'Use existing...'
but+ c


Messages In This Thread
Image capture format - by win - 05-07-2019, 11:08 PM
RE: Image capture format - by Kevin - 05-07-2019, 11:29 PM
RE: Image capture format - by win - 05-07-2019, 11:45 PM
RE: Image capture format - by Kevin - 05-08-2019, 12:17 AM
RE: Image capture format - by win - 05-08-2019, 12:43 AM
RE: Image capture format - by Kevin - 05-08-2019, 01:03 AM
RE: Image capture format - by win - 05-08-2019, 01:09 AM
RE: Image capture format - by Kevin - 05-08-2019, 02:03 AM
RE: Image capture format - by win - 05-08-2019, 02:14 AM
RE: Image capture format - by Kevin - 05-08-2019, 02:21 AM
RE: Image capture format - by win - 05-08-2019, 02:24 AM
RE: Image capture format - by Gintaras - 05-08-2019, 05:22 AM
RE: Image capture format - by win - 05-08-2019, 05:39 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)