A-man Posted May 11, 2011 Share Posted May 11, 2011 I know you can screenshot just the client, but can you screenshot just a portion of a client defined by box x1,y1,x2,y2? Quote Link to comment Share on other sites More sharing options...
FHannes Posted May 11, 2011 Share Posted May 11, 2011 There's no specific function to achieve this, however, I can add one if you'd like, as screenshots support png saving where as the regular bitmap system doesn't. You can work around the issue using the regular bitmap system, but you can't save to png as i said? [scar]var w, h, bmp: Integer; const xs = 100; ys = 100; xe = 300; ye = 200; begin w := xe - xs + 1; h := ye - ys + 1; bmp := BitmapFromString(w, h, ''); CopyClientToBitmap(bmp, xs, ys, xe, ye); SaveBitmap(bmp, ScreenPath + 'myscreenshot.bmp'); FreeBitmap(bmp); end.[/scar] Quote Link to comment Share on other sites More sharing options...
A-man Posted May 12, 2011 Author Share Posted May 12, 2011 That is fine. I'd actually rather have bitmaps because they are much smaller. A png screenshot of my entire desktop is like 8mb Quote Link to comment Share on other sites More sharing options...
FHannes Posted May 13, 2011 Share Posted May 13, 2011 Hmm, it's usually the other way around... Bitmaps are a lot bigger than PNG because bitmaps are raw data where as PNG uses compression. Quote Link to comment Share on other sites More sharing options...
Janilabo Posted May 14, 2011 Share Posted May 14, 2011 Haay Freddy, do you think you could improve the SCAR's Screenshot function (or add a new one) to work with Area (x1, y1, x2, y2) like requested here. ..and also add possiblity save the screenshot's as .PNG's with the function? That would be great! Right now it's full client and .BMP only, right? Quote Link to comment Share on other sites More sharing options...
FHannes Posted May 14, 2011 Share Posted May 14, 2011 Ah yes, it is bmp only indeed. I'll Add a SaveScreenshotEx for specifying a target box and I'll integrate the screenshot option into the function. Tweak for SaveScreenshot noted for minor release 3.25.02 SaveScreenshotEx noted for major release 3.26.00 Quote Link to comment Share on other sites More sharing options...
Janilabo Posted May 14, 2011 Share Posted May 14, 2011 Cheers! That is much appreciated. Quote Link to comment Share on other sites More sharing options...
FHannes Posted May 16, 2011 Share Posted May 16, 2011 Tweak for SaveScreenshot added in minor release 3.25.02 Quote Link to comment Share on other sites More sharing options...