Class ImageCapture

  • @Singleton
    public class ImageCapture
    extends Object
    • Method Detail

      • takeScreenshot

        public void takeScreenshot​(@Nullable
                                   String subDir,
                                   String fileName,
                                   boolean includeClientFrame,
                                   boolean notify,
                                   boolean copyToClipboard)
        Take a screenshot and save it
        subDir - the subdirectory to save the screenshot in
        fileName - the filename for the screenshot
        includeClientFrame - whether to include the client ui in the screenshot
        notify - whether to send a notification
        copyToClipboard - whether to copy the screenshot to clipboard
      • addClientFrame

        public BufferedImage addClientFrame​(Image image)
        Add the client frame to a screenshot
        image - the screenshot
      • saveScreenshot

        public void saveScreenshot​(BufferedImage screenshot,
                                   String fileName,
                                   String subDir,
                                   boolean notify,
                                   boolean saveToClipboard)
        Save a screenshot to disk. And optionally send a notification and copy it to clipboard.
        screenshot - screenshot
        fileName - Filename to use, without file extension.
        subDir - Directory within the player screenshots dir to store the captured screenshot to.
        notify - Send a notification to the system tray when the image is captured.
        saveToClipboard - Whether to also save the screenshot to clipboard