Expand description
SCScreenshotManager - Single-shot screenshot capture
Available on macOS 14.0+. Provides high-quality screenshot capture without the overhead of setting up a stream.
§When to Use
Use SCScreenshotManager when you need:
- A single screenshot rather than continuous capture
- Quick capture without stream setup/teardown overhead
- Direct saving to image files
For continuous capture, use SCStream instead.
§Example
use screencapturekit::screenshot_manager::{SCScreenshotManager, ImageFormat};
use screencapturekit::stream::{content_filter::SCContentFilter, configuration::SCStreamConfiguration};
use screencapturekit::shareable_content::SCShareableContent;
let content = SCShareableContent::get()?;
let display = &content.displays()[0];
let filter = SCContentFilter::create().with_display(display).with_excluding_windows(&[]).build();
let config = SCStreamConfiguration::new()
.with_width(1920)
.with_height(1080);
// Capture as CGImage
let image = SCScreenshotManager::capture_image(&filter, &config)?;
println!("Screenshot: {}x{}", image.width(), image.height());
// Save to file
image.save_png("/tmp/screenshot.png")?;
// Or save as JPEG with quality
image.save("/tmp/screenshot.jpg", ImageFormat::Jpeg(0.85))?;Structs§
- CGImage
CGImagewrapper for screenshots- SCScreenshot
Configuration - Configuration for advanced screenshot capture (macOS 26.0+)
- SCScreenshot
Manager - Manager for capturing single screenshots
- SCScreenshot
Output - Output from advanced screenshot capture (macOS 26.0+)
Enums§
- Image
Format - Image output format for saving screenshots
- SCScreenshot
Display Intent - Display intent for screenshot rendering (macOS 26.0+)
- SCScreenshot
Dynamic Range - Dynamic range for screenshot output (macOS 26.0+)