Skip to content

capture_jpeg() has no quality factor #23

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

Open
JohemianKnapsody opened this issue Mar 6, 2025 · 0 comments · May be fixed by #24
Open

capture_jpeg() has no quality factor #23

JohemianKnapsody opened this issue Mar 6, 2025 · 0 comments · May be fixed by #24

Comments

@JohemianKnapsody
Copy link
Collaborator

capture_jpeg() currently captures an image to disk and returns a blob that points to the image. The image is captured with a default Pi camera quality factor of 90 (page 39 of the Pi Camera manual). This means that even when capturing 8MP images, the file size is well below the ~3.6 MB of v2 of the OpenFlexure Microscope server code, which was based on picamera instead of picamera2

Suggest that we add an argument for quality factor, set it to either 95 or 100 by default (note that the manual suggests that 95 is the maximum, but 100 is suggested as an option in at least one thread by the picamera2 team), and then note in openflexure server v3 that this can be set when calling capture_jpeg

@JohemianKnapsody JohemianKnapsody linked a pull request Mar 6, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant