capture_jpeg() has no quality factor
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Locate the capture_jpeg() implementation and its callers in this Python FastAPI project, then inspect how JPEG capture options are passed to the camera. Confirm the supported quality range and choose the requested default before checking the OpenFlexure server v3 documentation context. Done means callers can provide a quality factor, the default is documented, and the resulting JPEG size or quality behavior is covered by the available checks.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 3
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from labthings/labthings-picamera2
-
Difficulty 3/5 1-2 days Newbie friendliness 40/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
labthings/labthings-picamera2#16 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
labthings/labthings-picamera2#12 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
labthings/labthings-picamera2#6 · 1 comment ·
All issues in labthings/labthings-picamera2
Similar issues
-
bug feature request
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Qiskit/qiskit-obp#156 ·
-
action-item enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
getcommunityone/open-navigator#1658 ·
Maintainers usually reply within 1 day
-
review-panel severity:low
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
kristovatlas/coin-accounting#636 ·
Maintainers usually reply within 1 day