Quote:
Originally Posted by juliansader
I've update the extension to v0.999:
|
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