python crashes when plot saved as png

Hello, When I tried out "python simple_plot.py" and tried to

    > save it as a png file, python crashes. No problem with saving
    > it to jpeg, though.

I haven't seen that before. It works fine on my system (Windows ME)
and noone else has reported a win32 problem. The fact that it works
with jpeg and not png suggests a lib PNG problem. What version of
pygtk and GTK-Runtime are you using. If you are using pygtk-2.0.0 and
GTK-Runtime-2.2.4.1, then you should be OK. Have you installed an
earlier version of these libs, possibly creating a library conflict?

When you search for libpng, what turns up?

JDH

John Hunter wrote:

"LUK" == LUK ShunTim <shuntim.luk@...34...> writes:

    > Hello, When I tried out "python simple_plot.py" and tried to
    > save it as a png file, python crashes. No problem with saving
    > it to jpeg, though.

I haven't seen that before. It works fine on my system (Windows ME)
and noone else has reported a win32 problem. The fact that it works
with jpeg and not png suggests a lib PNG problem. What version of
pygtk and GTK-Runtime are you using. If you are using pygtk-2.0.0 and
GTK-Runtime-2.2.4.1, then you should be OK. Have you installed an
earlier version of these libs, possibly creating a library conflict?

When you search for libpng, what turns up?

JDH

GTK 2.2.4 (Can't remember where I got it. There's been a few of these floating around.) Pygtk 2.0.0 from the link in matplotlib site.

Somehow my GTK runtime don't have the png, jpeg etc images libraries and I got them from the gnuwin32 sf site.

I followed the link in the matplotlib site and installed gtk 2.2.4.1 from the sf site and the problem goes away. This version has all the images libraries with them. I must bookmark it!

Another question: I've set the environmental variable AFMPATH in the registry via the control panel but matplotlib complains that the .afm files are not there.

<quote>
H:\00work\00cvs\matplotlib\matplotlib\examples>python simple_plot.py -dPS
Error: Could not find any AFM files; please set AFMPATH to point to some readable adobe font metric files

H:\00work\00cvs\matplotlib\matplotlib\examples>echo %AFMPATH%
E:\Py23e\share\matplotlib
</quote>

This is a W2K system.

Thanks very much,
ST

···

--