Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dialog_loadImage
#23
Macro Macro1447
Code:
Copy      Help
#compile "__Gdip"
GdipBitmap t_im t_out
OpenClipboard(0)
t_im.FromHBITMAP(GetClipboardData(CF_BITMAP))
CloseClipboard
if(!t_im) out "failed to get bitmap from clipboard"
;note: don't need to delete bitmap when from clipboard

__MemBmp mb.Create(300 300)

t_im.DrawResize(mb.dc 0 0 300 300 7)

t_out.FromHBITMAP(mb.bm)
t_out.Save("q:\g.png")

run "q:\g.png"

Actually can resize only with GDI+, but this works too.


Messages In This Thread

Forum Jump:


Users browsing this thread: 4 Guest(s)