Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Searching color from images
#5
Macro Macro2900
Code:
Copy      Help
;file
str sFile="$desktop$\qm test jpg gdip.jpg"

;________________________

;get clipboard bitmap
if(!OpenClipboard(0)) end "failed" ;;TODO: wait until succeeds
_i=GetClipboardData(CF_BITMAP)
__GdiHandle hb; if(_i) hb=CopyImage(_i 0 0 0 LR_CREATEDIBSECTION)
CloseClipboard
if(_i=0) end "no bitmap in clipboard"

;save as jpg
#compile "__Gdip"



GdipBitmap im
if(!im.FromHBITMAP(hb)) end "error"
if(!im.Save(sFile)) end "error"

;________________________

;show the image
run sFile


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)