XBM loader is too strict on variable name
维护者通常 1 天内回复
还没有人认领这个 Issue。
- #10088 来自 @teachershuang —— 已关闭,未合并
评估
调研方向
从 Pillow-12.3.0/src/PIL/XbmImagePlugin.py 中的 xbm_head 定义开始,并使用 issue 中的 hopper_xbm 示例重现该故障。当变量名不以 _bits 或 _xbm 结尾的 XBM 文件可以打开,同时不破坏现有的 hopper_bits 情况时,修复就完成了。
由索引模型根据 Issue 内容生成。
描述
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 won't:
#define hopper_width 128
#define hopper_height 128
static char hopper_xbm[] = {...
_xbm is another common suffix, but please don't restrict to only _xbm and _bits!
- 主要语言
- Python
- 星标
- 13.9k
- 派生
- 2.5k
- 平均合并
- 1 天 6 小时
- 30 天内合并 PR
- 162
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
python-pillow/Pillow 的其他 Issue
-
Warn that pre-applying arabic_reshaper + python-bidi corrupts text on a Raqm build可能已有人在做 @Syamjith-NK 于 58 天前认领。 未关闭Documentation Font Rendering PNG Third Party Framework
难度 2/5 1-3 小时 新手友好度 78/100
python-pillow/Pillow#9907 · 2 条评论 ·
维护者通常 1 天内回复
-
Image.putpixel incorrectly labels supported arguments in type annotations可能已有人在做 @radarhere 于 186 天前认领。 未关闭PNG
难度 2/5 1-3 小时 新手友好度 70/100
python-pillow/Pillow#9584 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
python-pillow/Pillow#10311 ·
维护者通常 1 天内回复
-
FITS: BZERO/BSCALE are ignored and 16-bit data is read as unsigned可能已有人在做 @karandhaodiyal28-hash 今天认领。 未关闭
难度 4/5 3-5 天 新手友好度 45/100
python-pillow/Pillow#10309 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 1/100
python-pillow/Pillow#10302 ·
维护者通常 1 天内回复
查看 python-pillow/Pillow 的全部 Issue
相似的 Issue
-
link-rot
难度 1/5 1 小时以内 新手友好度 67/100
-
难度 2/5 1-3 小时 新手友好度 82/100
developmentseed/titiler-cmr#265 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Insecure Brotli version <1.2.1可能已有人在做 @jamescw19 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
stac-utils/stac-fastapi-pgstac#438 · 1 个 reaction ·
-
bug triage
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 1 天内回复