Crate webp_screenshot_rust

Crate webp_screenshot_rust 

Source
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
ffic-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§

WebPScreenshot
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