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
pub fn create_photo(path: &PathBuf) -> Result<(), &'static str>{ let index: CameraIndex = CameraIndex::Index(0); let requested: RequestedFormat<'_> = RequestedFormat::new::<RgbFormat>(RequestedFormatType::AbsoluteHighestResolution); let res: Result<Camera, nokhwa::NokhwaError> = Camera::new(index, requested); if res.is_err(){ return Err("Camera error"); } let mut camera: Camera = res.unwrap(); let frame = camera.frame().unwrap(); let decoded = frame.decode_image::<RgbFormat>().unwrap(); match decoded.save_with_format(path, image::ImageFormat::Jpeg){ Ok(_) => {}, Err(_) => return Err("Photo write error") } Ok(()) }
But when I shot something fully black from one laptop, I have But from another
Platform: Windows 10 Feature: input-native nokhwa v.0.10.4
The text was updated successfully, but these errors were encountered:
I've tried different methods:
Sorry, something went wrong.
Did you try opening the camera stream before calling frame()?
frame()
No branches or pull requests
But when I shot something fully black from one laptop, I have
![image](https://private-user-images.githubusercontent.com/103883404/384642356-6ba3f3f8-e834-4e01-875d-bbe5a41b0d29.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4ODM2NDIsIm5iZiI6MTczODg4MzM0MiwicGF0aCI6Ii8xMDM4ODM0MDQvMzg0NjQyMzU2LTZiYTNmM2Y4LWU4MzQtNGUwMS04NzVkLWJiZTVhNDFiMGQyOS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwNlQyMzA5MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1lNThjODc4YjUzYmNiZjBiYjUxMWRkNDVkN2UzYjYwMmYyZDc5ZWQ1ZWJkYjMyZjk5NzQzYjBlYjc2ZGIzZmU2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.RG77Z6K349GWamE_KzsZnWiYYqE8jls62WQ5wJpsVDo)
![image](https://private-user-images.githubusercontent.com/103883404/384642363-c61311b6-6f12-40dc-9d2b-c9550b3ec5b4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg4ODM2NDIsIm5iZiI6MTczODg4MzM0MiwicGF0aCI6Ii8xMDM4ODM0MDQvMzg0NjQyMzYzLWM2MTMxMWI2LTZmMTItNDBkYy05ZDJiLWM5NTUwYjNlYzViNC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwMjA2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDIwNlQyMzA5MDJaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT03MWJiMzdhMWMxNTgzM2E1MWJmZDgyYzVmNjE4YjIyNjdiYTdkNGE2NDZmNzc1ZmNkYmM3OGNhYmY4YTdkNzc4JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.-W7_z4prsujKhvbZr9KlALKpD4rY2rSpW7tYiDJK48k)
But from another
Platform: Windows 10
Feature: input-native
nokhwa v.0.10.4
The text was updated successfully, but these errors were encountered: