Image show fails in Firefox with high resolution image
未关闭
还没有人认领这个 Issue。
bug
P3
- 主要语言
- Python
- 星标
- 18.8k
- 派生
- 2.8k
- 平均合并
- 16 小时 26 分钟
- 30 天内合并 PR
- 21
描述
This large 10709x2425 image fails to show with
px.imshow or with add_layout_image on Firefox. It does load on Chrome.
from urllib.request import urlretrieve
import plotly.express as px
import PIL.Image
image_url = "https://github.com/plotly/plotly.py/assets/86078178/11c9876a-233c-4a2b-bfd8-5d8f197ca808"
image_file = urlretrieve(image_url)[0]
with PIL.Image.open(image_file) as image:
px.imshow(image).show()
downsampled_image = image.resize((image.width // 4, image.height // 4))
px.imshow(downsampled_image).show()
This code should display a blank plot, followed by a plot of the desired image.
Versions:
plotly: 5.15.0
kaleido: 0.2.1
firefox: 114.0.2 (64-bit)
system: Ubuntu 20.04.6 LTS
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
使用提供的 Python 复现程序,以 px.imshow 和 add_layout_image 为入口,比较 Firefox 和 Chrome 在 10709x2425 图像及其降采样版本上的表现。跟踪这些入口使用的图像渲染路径,并通过确认完整分辨率的图像能在 Firefox 中显示且不影响降采样版本的情况来验证修复。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100