nashaofu / xcap

XCap is a cross-platform screen capture library written in Rust. It supports Linux (X11, Wayland), MacOS, and Windows. XCap supports screenshot and video recording (to be implemented).

Home Page:https://docs.rs/xcap

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Saving screenshot as JPEG only produces garbage

gucki opened this issue · comments

This works as expected:

    image
        .save(format!("monitor-{}.png", normalized(monitor.name())))
        .unwrap();

This produces a completely broken JPEG file:

    image
        .save(format!("monitor-{}.jpg", normalized(monitor.name())))
        .unwrap();

I'm crosscompiling from linux to windows using cargo build --target x86_64-pc-windows-gnu.

This should be a bug in crate image,image-rs/image#2188