From: Robert Leftwich <robert@le...> - 2005-02-15 22:08:57
Having just had a call from a client saying 'love the new graph, but why is the
background sky blue' and thinking 'I've never done anything with sky blue in my
life! - what have I broken', I then proceeded to learn more about Microsoft's
lack of standards support than I really wanted or could spare the time to do.
The upshot is that transparent png's work perfectly in all tested browsers, as
well as sundry image viewers/editors but not in IE, sigh!
I wondered why I hadn't struck this problem before so I looked at a few of my
older, gnuplot generated, transparent png's, which worked perfectly in IE. A
quick look with gimp shows that gnuplot uses a different technique for
transparency than does Matplotlib. The transparent colour info for the gnuplot
image is R:0, G:0, B:0, Alpha:0, Index:254 while for Matplotlib it is R:255,
G:255, B:255, Alpha:0, with no Index.
Now I don't know enough (er, anything) about the low level detail of the png
format, but I wonder if it is possible to achieve the same result in Matplotlib
or do I need to post-process (using ImageMagick or similar) to generate the same
style of png or possibly gif's?