Skip to content
New issue

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

Pictures taken from the camera are saved in the working directory itself. #177

Closed
namana-mecha opened this issue Feb 5, 2025 · 0 comments · Fixed by #178
Closed

Pictures taken from the camera are saved in the working directory itself. #177

namana-mecha opened this issue Feb 5, 2025 · 0 comments · Fixed by #178
Labels
camera-app The Mechanix Camera App enhancement New feature or request good first issue Good for newcomers

Comments

@namana-mecha
Copy link
Contributor

How to reporduce?

When we take a picture from the camera app the picture is expected to be stored at ~/Picture/*.jpg but it doesn't have a default location to be stored.

Additional information

The picture taken is being stored in the working directory of the camera app as frame2.png which needs to be fixed

The following code is responsible for saving the picture. The code belongs to the function contexts::camera::save_frame().

let buffer = yuyv422_to_rgb(frame.as_raw(), true).unwrap();
let frame: ImageBuffer<image::Rgba<u8>, Vec<u8>> =
    ImageBuffer::from_raw(width, height, buffer).unwrap();
frame.save("frame2.jpg").unwrap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
camera-app The Mechanix Camera App enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant