XBM loader is too strict on variable name
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
Research direction
Start with the xbm_head definition in Pillow-12.3.0/src/PIL/XbmImagePlugin.py and reproduce the failure using the hopper_xbm example from the issue. The fix is done when XBM files whose variable name does not end in _bits or _xbm can be opened without breaking the existing hopper_bits case.
Written by the indexing model from the issue text.
Description
Pillow fails to open almost all my xbm files.
The reason is the xbm_head in Pillow-12.3.0/src/PIL/XbmImagePlugin.py
It hard-codes the fact that the variable name must ends with "_bits", which is maybe a common
practice, but definitely not a requirement.
So this will load:
#define hopper_width 128
#define hopper_height 128
static char hopper_bits[] = {...
But this one wont:
#define hopper_width 128
#define hopper_height 128
static char hopper_xbm[] = {...
_xbm is another common suffix, but please dont restrict to ony _xbm and _bits !
- Dominant language
- Python
- Stars
- 13.9k
- Forks
- 2.5k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 98
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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 python-pillow/Pillow
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
python-pillow/Pillow#9997 · 2 comments ·
Maintainers usually reply within 1 day
-
Documentation Font Rendering Third Party Framework
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
python-pillow/Pillow#9907 · 2 comments ·
Maintainers usually reply within 1 day
-
Documentation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
python-pillow/Pillow#9810 · 2 comments ·
Maintainers usually reply within 1 day
-
License
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
python-pillow/Pillow#9657 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
python-pillow/Pillow#9584 · 1 comment ·
Maintainers usually reply within 1 day
All issues in python-pillow/Pillow
Similar issues
-
repo-audit
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
scverse/repo-health#20 ·
Maintainers usually reply within 1 day
-
/context/prime scope override double-prefixes an entity-ref project and drops its scoped memoriesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
phasespace-labs/palinode#232 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
collective/icalendar#1858 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
langflow-ai/langflow#15496 ·
Maintainers usually reply within 1 day