From: Kuzminski, S. R <SKu...@fa...> - 2004-01-29 07:08:53
|
The windows GD build is bear. I had it completely working, then I upgraded to 0.41 and took a few steps back. =20 First a little background. I'm building a reporting tool for a commercial analytics platform. This tool takes an XML specification and data, and outputs HTML tables and plots. The larger platform is all Java, I am providing the reporting as an stand alone ( Python ) executable on Win32, Linux and Solaris. So my overall requirements are to create HTML ( and hence .png images ) on all three platforms with a distribution of a single binary file ( one for each platform ). Here are some quick notes on what I have had to do, once it is working, I will provide at least the MSVC makefiles an maybe a binary build, time permitting. =20 the GD backend has these dependencies.. libpng zlib gd freetype gdmodule The 2 main problems I seem to have are that the dll release of GD does not include a gd.lib. ( MSVC needs a .lib to link with a .dll ) GD does not seem to come with a windows make file, so I made one. =20 The other problem is that _gdmodule.c needs to have line 1882 changed to pass a NULL to PYObject_HEAD_INIT=20 ... static PyTypeObject Imagetype =3D { PyObject_HEAD_INIT(NULL) ... I am working on this currently and will post more results as I get them. thanks, Stefan -----Original Message----- From: John Hunter [mailto:jdh...@ni...]=20 Sent: Friday, January 23, 2004 6:58 AM To: Kuzminski, Stefan R Cc: mat...@li... Subject: Re: [Matplotlib-users] broken PNG files with GD backend >>>>> "Kuzminski," =3D=3D Kuzminski, Stefan R <SKu...@fa...> writes: Kuzminski> Now on to my specific problem. I'm using the GD Kuzminski> backend on Windows with Matplotlib 0.41. =20 First things first -- I haven't succeeded in getting the gd backend compiled on windows. If you have some expertise here and are willing to share, or better yet build a gdmodule and gd installer that I can put on the website, I would be very much obliged! I contacted the gdmodule maintainer some time ago over this issue and he had never built it on windows either. In my googling, I discovered the perl gd module for windows and following their lead, succeeded in building gd lib, but ran into some troubles (can't remember what) building gdmodule. Kuzminski> If I set the dpi to over 60 the png file that gets Kuzminski> generated is 'empty', it's only 17 bytes long. As soon Kuzminski> as I drop he DPI to below 65 or so, I get the image Kuzminski> file correctly. This is with the simple_plot.py Kuzminski> example. Now on to your problem. Is there a typo here? You say over 60 is empty and under 65 is ok ?? Can you send me a script which replicates the problem, with the two calls to savefig, one which has the problem and which does not. Then I can begin to diagnose the problem; see if it occurs under linux, see if it's a gd problem, see if it's a problem on my end, etc.... Are you using matplotlib + GD for a web app server? =20 John Hunter=20 =20 |