adafruit / adafruit/Adafruit_CircuitPython_PyPortal

Allow resizing images to keep full image instead of cropping

Open
#135 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
46
Forks
56
PR merge metrics
No merged PRs in 30d

Description

Add options to process_image so images can be added on top of background rather than just cropped. I think now that we have bitmap tools, this may be possible, though the images downloaded via the image formatter service are being loaded as ondiskbitmaps to conserve memory and bitmap tools requires the bitmaps to fully be loaded into memory.

Another option (and perhaps it already exists since there doesn't appear to be documentation) is to add a parameter to the image formatter service to let it know what color of background we would like and that would solve the issue.

See https://forums.adafruit.com/viewtopic.php?p=1014450 for more info.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing process_image and the image formatter service, then inspect how downloaded images are loaded as ondiskbitmaps and how bitmap tools handle memory. Compare the available approaches with the linked forum discussion; done means a defined option preserves the full image with a background and its behavior is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-graphics, embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.