Package net.runelite.client.util
Class ImageCapture
- java.lang.Object
-
- net.runelite.client.util.ImageCapture
-
@Singleton public class ImageCapture extends Object
-
-
Constructor Summary
Constructors Constructor Description ImageCapture(Client client, Notifier notifier, ClientUI clientUi, DrawManager drawManager, ScheduledExecutorService executor, EventBus eventBus)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BufferedImage
addClientFrame(Image image)
Add the client frame to a screenshotvoid
saveScreenshot(BufferedImage screenshot, String fileName, String subDir, boolean notify, boolean saveToClipboard)
Save a screenshot to disk.void
takeScreenshot(BufferedImage screenshot, String fileName, boolean notify, ImageUploadStyle imageUploadStyle)
Deprecated.This method formerly could upload the image to Imgur, which is no longer supported.void
takeScreenshot(BufferedImage screenshot, String fileName, String subDir, boolean notify, ImageUploadStyle imageUploadStyle)
Deprecated.This method formerly could upload the image to Imgur, which is no longer supported.void
takeScreenshot(String subDir, String fileName, boolean includeClientFrame, boolean notify, boolean copyToClipboard)
Take a screenshot and save it
-
-
-
Constructor Detail
-
ImageCapture
@Inject public ImageCapture(Client client, Notifier notifier, ClientUI clientUi, DrawManager drawManager, ScheduledExecutorService executor, EventBus eventBus)
-
-
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 infileName
- the filename for the screenshotincludeClientFrame
- whether to include the client ui in the screenshotnotify
- whether to send a notificationcopyToClipboard
- 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
- screenshotfileName
- 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(BufferedImage screenshot, String fileName, @Nullable 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.
-
takeScreenshot
@Deprecated public void takeScreenshot(BufferedImage screenshot, 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.
-
-