fossasia/visdom

Adding support for alpha channels

已关闭

#694 创建于 2020年1月2日

 (4 条评论) (0 个反应) (0 位负责人)Python (1,152 个派生)batch import
enhancementhelp wanted

仓库指标

星标
 (9,831 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Currently, this project supports displaying greyscale and RGB images. However, many digital images also contain an alpha channel, and it would be nice to display images as RGBA, rather than converting them to RGB.

My initial investigation shows that simply changing the depth of the first axis from 3 to 4 in https://github.com/facebookresearch/visdom/blob/master/py/visdom/__init__.py#L1268 allows for proper display of RGBA images. Grayscale and RGB images would need to be converted to RGBA by adding a 'full' alpha channel.

Changing only the line as described above, and setting the background of the windows to green gives the following result: image

贡献者指南