From 6804420e582246e087f28f4314d442337b062ff9 Mon Sep 17 00:00:00 2001 From: NiiightmareXD Date: Fri, 10 Nov 2023 13:38:26 -0800 Subject: [PATCH] =?UTF-8?q?Added=20benchmark=20=F0=9F=8E=89=20=09modified:?= =?UTF-8?q?=20=20=20examples/basic.rs=20=09modified:=20=20=20src/frame.rs?= =?UTF-8?q?=20=09modified:=20=20=20windows-capture-python/windows=5Fcaptur?= =?UTF-8?q?e/=5F=5Finit=5F=5F.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/basic.rs | 2 +- src/frame.rs | 2 +- windows-capture-python/windows_capture/__init__.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/basic.rs b/examples/basic.rs index c78a5a8..2bdae30 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -30,7 +30,7 @@ impl WindowsCaptureHandler for Capture { ) -> Result<(), Box> { println!("New Frame Arrived"); - // Save The Frame As An Image To Specified Path + // Save The Frame As An Image To The Specified Path frame.save_as_image("image.png")?; // Gracefully Stop The Capture Thread diff --git a/src/frame.rs b/src/frame.rs index d3bfc96..191946e 100644 --- a/src/frame.rs +++ b/src/frame.rs @@ -92,7 +92,7 @@ impl<'a> Frame<'a> { Ok(frame_buffer) } - /// Save The Frame As An Image To Specified Path + /// Save The Frame As An Image To The Specified Path pub fn save_as_image>( &mut self, path: T, diff --git a/windows-capture-python/windows_capture/__init__.py b/windows-capture-python/windows_capture/__init__.py index 1c8742d..f061ff3 100644 --- a/windows-capture-python/windows_capture/__init__.py +++ b/windows-capture-python/windows_capture/__init__.py @@ -26,7 +26,7 @@ class Frame: Methods ------- save_as_image(path: str): - Saves The Frame As An Image To Specified Path + Saves The Frame As An Image To The Specified Path to_bgr() -> "Frame": Converts The self.frame_buffer Pixel Type To Bgr Instead Of Bgra crop( @@ -42,7 +42,7 @@ def __init__(self, frame_buffer: numpy.ndarray, width: int, height: int) -> None self.height = height def save_as_image(self, path: str) -> None: - """Save The Frame As An Image To Specified Path""" + """Save The Frame As An Image To The Specified Path""" cv2.imwrite(path, self.frame_buffer) def convert_to_bgr(self) -> "Frame":