Class ImageCapture


  • @Singleton
    public class ImageCapture
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      ImageCapture​(net.runelite.api.Client client, Notifier notifier, ClientUI clientUi, DrawManager drawManager, java.util.concurrent.ScheduledExecutorService executor, EventBus eventBus)  
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      java.awt.image.BufferedImage addClientFrame​(java.awt.Image image)
      Add the client frame to a screenshot
      void saveScreenshot​(java.awt.image.BufferedImage screenshot, java.lang.String fileName, java.lang.String subDir, boolean notify, boolean saveToClipboard)
      Save a screenshot to disk.
      void takeScreenshot​(java.awt.image.BufferedImage screenshot, java.lang.String fileName, boolean notify, ImageUploadStyle imageUploadStyle)
      Deprecated.
      This method formerly could upload the image to Imgur, which is no longer supported.
      void takeScreenshot​(java.awt.image.BufferedImage screenshot, java.lang.String fileName, java.lang.String subDir, boolean notify, ImageUploadStyle imageUploadStyle)
      Deprecated.
      This method formerly could upload the image to Imgur, which is no longer supported.
      void takeScreenshot​(java.lang.String subDir, java.lang.String fileName, boolean includeClientFrame, boolean notify, boolean copyToClipboard)
      Take a screenshot and save it
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImageCapture

        @Inject
        public ImageCapture​(net.runelite.api.Client client,
                            Notifier notifier,
                            ClientUI clientUi,
                            DrawManager drawManager,
                            java.util.concurrent.ScheduledExecutorService executor,
                            EventBus eventBus)
    • Method Detail

      • takeScreenshot

        public void takeScreenshot​(@Nullable
                                   java.lang.String subDir,
                                   java.lang.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 java.awt.image.BufferedImage addClientFrame​(java.awt.Image image)
        Add the client frame to a screenshot
        Parameters:
        image - the screenshot
        Returns:
      • saveScreenshot

        public void saveScreenshot​(java.awt.image.BufferedImage screenshot,
                                   java.lang.String fileName,
                                   @Nullable
                                   java.lang.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
      • takeScreenshot

        @Deprecated
        public void takeScreenshot​(java.awt.image.BufferedImage screenshot,
                                   java.lang.String fileName,
                                   @Nullable
                                   java.lang.String subDir,
                                   boolean notify,
                                   ImageUploadStyle imageUploadStyle)
        Deprecated.
        This method formerly could upload the image to Imgur, which is no longer supported. Use saveScreenshot instead.
        Saves a screenshot to the screenshots folder as a PNG, and fires a ScreenshotTaken event afterward.
        See Also:
        saveScreenshot(BufferedImage, String, String, boolean, boolean)
      • takeScreenshot

        @Deprecated
        public void takeScreenshot​(java.awt.image.BufferedImage screenshot,
                                   java.lang.String fileName,
                                   boolean notify,
                                   ImageUploadStyle imageUploadStyle)
        Deprecated.
        This method formerly could upload the image to Imgur, which is no longer supported. Use saveScreenshot instead.
        Saves a screenshot to the screenshots folder as a PNG, and fires a ScreenshotTaken event afterward.
        See Also:
        saveScreenshot(BufferedImage, String, String, boolean, boolean)