pub enum ImageFormat {
Png,
Jpeg(f32),
Tiff,
Gif,
Bmp,
Heic(f32),
}Available on crate feature
macos_14_0 only.Expand description
Image output format for saving screenshots
§Examples
use screencapturekit::screenshot_manager::ImageFormat;
// PNG for lossless quality
let format = ImageFormat::Png;
// JPEG with 80% quality
let format = ImageFormat::Jpeg(0.8);
// HEIC with 90% quality (smaller file size than JPEG)
let format = ImageFormat::Heic(0.9);Variants§
Png
PNG format (lossless)
Jpeg(f32)
JPEG format with quality (0.0-1.0)
Tiff
TIFF format (lossless)
Gif
GIF format
Bmp
BMP format
Heic(f32)
HEIC format with quality (0.0-1.0) - efficient compression
Implementations§
Trait Implementations§
Source§impl Clone for ImageFormat
impl Clone for ImageFormat
Source§fn clone(&self) -> ImageFormat
fn clone(&self) -> ImageFormat
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImageFormat
impl Debug for ImageFormat
Source§impl PartialEq for ImageFormat
impl PartialEq for ImageFormat
Source§fn eq(&self, other: &ImageFormat) -> bool
fn eq(&self, other: &ImageFormat) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for ImageFormat
impl StructuralPartialEq for ImageFormat
Auto Trait Implementations§
impl Freeze for ImageFormat
impl RefUnwindSafe for ImageFormat
impl Send for ImageFormat
impl Sync for ImageFormat
impl Unpin for ImageFormat
impl UnsafeUnpin for ImageFormat
impl UnwindSafe for ImageFormat
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more