Expand description
WebP Screenshot Capture Library
A high-performance, cross-platform library for capturing screenshots and encoding them as WebP images with minimal overhead.
§Example
use webp_screenshot_rust::{WebPScreenshot, CaptureConfig};
// Simple capture
let screenshot = WebPScreenshot::new()?;
let result = screenshot.capture_display(0)?;
result.save("screenshot.webp")?;
// With custom configuration
let config = CaptureConfig {
include_cursor: true,
..Default::default()
};
let screenshot = WebPScreenshot::with_config(config)?;
let result = screenshot.capture_display(0)?;Re-exports§
pub use capture::Capturer;pub use capture::ScreenCapture;pub use encoder::WebPEncoder;pub use encoder::EncoderOptions;pub use error::CaptureError;pub use error::CaptureResult;pub use error::EncodingError;pub use error::EncodingResult;pub use memory_pool::MemoryPool;pub use memory_pool::PooledBuffer;pub use pipeline::StreamingPipeline;pub use pipeline::StreamingPipelineBuilder;pub use pipeline::ZeroCopyOptimizer;pub use types::CaptureConfig;pub use types::CaptureMetadata;pub use types::CaptureRegion;pub use types::DisplayInfo;pub use types::PerformanceStats;pub use types::PixelFormat;pub use types::RawImage;pub use types::Rectangle;pub use types::Screenshot;pub use types::WebPConfig;
Modules§
- capture
- Screen capture module with platform-specific implementations
- encoder
- WebP encoding module
- error
- Error types for the webp-screenshot library
- ffi
c-api - FFI/C API for WebP Screenshot library
- memory_
pool - Memory pool for efficient buffer management
- pipeline
- Pipeline modules for optimized capture and encoding
- types
- Core types and structures for screenshot capture and WebP encoding
Structs§
- WebP
Screenshot - Main entry point for screenshot capture
Functions§
- capabilities
- Get library capabilities
- capture_
primary_ display - Convenience function to capture the primary display
- capture_
with_ quality - Convenience function to capture with specific quality
- get_
displays - Get available displays
- version
- Library version information