We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I looked but couldn't find anything on how to remove this yellow border around the window.
` use scap::{ capturer::{Capturer, Options, Resolution}, frame::{Frame, FrameType}, get_all_targets, Target }; use opencv::{core::{get_cuda_enabled_device_count, GpuMat, GpuMatTrait, GpuMatTraitConst, Mat, MatTraitConst, Mat_AUTO_STEP, CV_8UC4}, highgui, imgproc::{self, cvt_color}};
fn main() -> Result<(), Box> {
let targets = get_all_targets(); let new_world_window = targets .into_iter() .find(|target| match target { Target::Window(window) => window.title == "New World", _ => false, }); let options = Options { fps: 30, target: new_world_window, show_cursor: false, show_highlight: false, excluded_targets: None, output_type: FrameType::BGRAFrame, output_resolution: Resolution::_480p, crop_area: None, ..Default::default() }; let mut capturer = Capturer::new(options); capturer.start_capture(); highgui::named_window("Scap Preview", highgui::WINDOW_NORMAL)?; loop { if let Ok(frame) = capturer.get_next_frame() { if let Frame::BGRA(bgra_frame) = frame { let data = bgra_frame.data.as_slice(); let width = bgra_frame.width as i32; let height = bgra_frame.height as i32; let bgra_mat = Mat::from_slice(data)?; let bgra_mat = bgra_mat.reshape(4, height)?; let mut bgr_frame = Mat::default(); imgproc::cvt_color(&bgra_mat, &mut bgr_frame, imgproc::COLOR_BGRA2BGR, 0)?; highgui::imshow("Scap Preview", &bgr_frame)?; if highgui::wait_key(1)? == 'q' as i32 { break; } } } } Ok(())
} `
The text was updated successfully, but these errors were encountered:
#141 😄
Sorry, something went wrong.
No branches or pull requests
I looked but couldn't find anything on how to remove this yellow border around the window.
`
use scap::{
capturer::{Capturer, Options, Resolution}, frame::{Frame, FrameType}, get_all_targets, Target
};
use opencv::{core::{get_cuda_enabled_device_count, GpuMat, GpuMatTrait, GpuMatTraitConst, Mat, MatTraitConst, Mat_AUTO_STEP, CV_8UC4}, highgui, imgproc::{self, cvt_color}};
fn main() -> Result<(), Box> {
}
`
The text was updated successfully, but these errors were encountered: