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
        Parameters:
        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
        Parameters:
        image - the screenshot
        Returns:
      • saveScreenshot

        public void saveScreenshot​(BufferedImage screenshot,
                                   String fileName,
                                   @Nullable
                                   String subDir,
                                   boolean notify,
                                   boolean saveToClipboard)
        Save a screenshot to disk. And optionally send a notification and copy it to clipboard.
        Parameters:
        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