Skip to content

Blank png: x.png does not set the alpha/transparency info correctly ! #848

@jypeter

Description

@jypeter

I have finally understood why I was getting completely blank png images, as reported in #845 after trying to open the png in different programs: it seems that somehow the image is there, but the alpha channel value is set to 0 for all the pixels (according to gimp's color picker tool), which make the image seem completely transparent

Am I the only person having this problem ???

@doutriaux1 , could you check the properties of the saved png you generate?

When I run the following commands

import numpy as np, vcs
id100 = np.identity(100)
x = vcs.init()
x.plot(id100)
x.png('test_default_png')

I get the following completely blank/transparent image!
test_default_png
If I remove the alpha/transparency with ImageMagick (http://www.imagemagick.org/Usage/masking/#alpha_off), I get a png with the visible image I want! Of course, I'd like to have directly a png I can see :)

convert -alpha off test_default_png.png test_default_png-noalpha.png

test_default_png-noalpha

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions