fix(adb_client): image crate had no output format by default

This commit is contained in:
Corentin LIAUD
2025-12-26 11:12:32 +01:00
parent 5075e09d0e
commit 947964163b
2 changed files with 4 additions and 2 deletions

View File

@@ -15,7 +15,7 @@ base64 = { version = "0.22.1" }
bincode = { version = "2.0.1", features = ["serde"] }
byteorder = { version = "1.5.0" }
chrono = { version = "0.4.42", default-features = false, features = ["std"] }
image = { version = "0.25.9", default-features = false }
image = { version = "0.25.9", default-features = false, features = ["png"] }
log = { version = "0.4.29" }
mdns-sd = { version = "0.17.1", default-features = false, features = [
"logging",

View File

@@ -50,7 +50,9 @@ pub trait ADBDeviceExt {
/// Inner method requesting framebuffer from an Android device
fn framebuffer_inner(&mut self) -> Result<ImageBuffer<Rgba<u8>, Vec<u8>>>;
/// Dump framebuffer of this device into given path
/// Dump framebuffer of this device into given path.
///
/// Output data format is currently only `PNG`.
fn framebuffer(&mut self, path: &dyn AsRef<Path>) -> Result<()> {
// Big help from AOSP source code (<https://android.googlesource.com/platform/system/adb/+/refs/heads/main/framebuffer_service.cpp>)
let img = self.framebuffer_inner()?;