utilities - Vrekt/Lunar GitHub Wiki
Using the Capture utility.
The Capture class provides easy access to getting screenshots. To screenshot do:
Capture.screenshotAndSave(int width, int height, File saveTo, String imageType);
- imageTypeis the extension, for example .png. bmp.
This screenshots then it saves it.
Say we don't wanna screenshot the whole screen for that we can use screenshotPart.
Capture.screenshotPart(int x, int y, int width, int height);