Skip to content

Commit

Permalink
fix: Rounded full on video and h_cloned
Browse files Browse the repository at this point in the history
  • Loading branch information
richiemcilroy committed Mar 21, 2024
1 parent 6857a61 commit add6525
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/desktop/src-tauri/src/media.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ impl MediaRecorder {
screenshot_captured = true;
let screenshot_file_path_owned_cloned = screenshot_file_path_owned.clone();
let w_cloned = adjusted_width.clone();
let h_cloned = adjusted_height.clone();

let frame_clone = frame.to_vec();
std::thread::spawn(move || {
Expand All @@ -320,14 +321,13 @@ impl MediaRecorder {
for chunk in row_data.chunks_mut(4) {
chunk.swap(0, 2);
}
println!("Row data length: {}", row_data.len());
frame_data.extend_from_slice(&row_data);
}

let path = Path::new(&screenshot_file_path_owned_cloned);
let image: ImageBuffer<Rgba<u8>, Vec<u8>> = ImageBuffer::from_raw(
w_cloned.try_into().unwrap(),
h.try_into().unwrap(),
h_cloned.try_into().unwrap(),
frame_data
).expect("Failed to create image buffer");

Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/components/windows/Camera.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export const Camera = () => {
autoPlay
playsInline
muted
className="absolute top-0 left-0 w-full h-full object-cover pointer-events-none"
className="absolute top-0 left-0 w-full h-full object-cover pointer-events-none rounded-full"
/>
</div>
);
Expand Down

1 comment on commit add6525

@vercel
Copy link

@vercel vercel bot commented on add6525 Mar 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.