fossasia/visdom

Adding support for alpha channels

Open

#694 创建于 2020年1月2日

在 GitHub 查看
 (4 评论) (0 反应) (0 负责人)Python (9,831 star) (1,152 fork)batch import
enhancementhelp wanted

描述

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

贡献者指南