02-10-2020, 07:42 AM
|
#956
|
Human being with feelings
Join Date: May 2012
Location: Berlin, Germany
Posts: 171
|
Quote:
Originally Posted by Edgemeal
Thanks for the updates!
Updated CaptureScreenArea function (API v0.999), no more leak!
Code:
function CaptureScreenArea(x,y,w,h,filename)
scrnDC = reaper.JS_GDI_GetScreenDC() --< Only available on Windows!
destBmp = reaper.JS_LICE_CreateBitmap(true,w,h)
destDC = reaper.JS_LICE_GetDC(destBmp)
reaper.JS_GDI_Blit(destDC, 0, 0, scrnDC, x, y, w, h)
reaper.JS_LICE_WritePNG(filename, destBmp, false)
reaper.JS_LICE_DestroyBitmap(destBmp)
reaper.JS_GDI_ReleaseDC(scrnDC)
end
|
I figure this will not/never work on MacOS?
|
|
|