Skip to content

Commit

Permalink
Added benchmark 🎉
Browse files Browse the repository at this point in the history
	modified:   examples/basic.rs
	modified:   src/frame.rs
	modified:   windows-capture-python/windows_capture/__init__.py
  • Loading branch information
NiiightmareXD committed Nov 10, 2023
1 parent dee6ff9 commit 6804420
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ impl WindowsCaptureHandler for Capture {
) -> Result<(), Box<dyn Error + Send + Sync>> {
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
Expand Down
2 changes: 1 addition & 1 deletion src/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: AsRef<Path>>(
&mut self,
path: T,
Expand Down
4 changes: 2 additions & 2 deletions windows-capture-python/windows_capture/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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":
Expand Down

0 comments on commit 6804420

Please sign in to comment.