getLegendGraphic - GD Library Error

Daniel Morissette dmorissette at DMSOLUTIONS.CA
Wed Oct 27 17:38:45 EDT 2004


Astrid Emde wrote:
> Hello,
>
> wenn I send my getLegendGraphic-Request I get the following error:
>
> msDrawLegend(): GD library error. Unable to initialize image.
> msImageCreateGD(): Image handling error. Cannot create GD image of size
> 60 x 0.
>
> Does anyone know, what can be wrong? How can I solve the problem?
>

Is this using the 4.4.0-beta1? If not then the first thing to do would
be to try 4.4.0-beta1.

I tried hacking together a quick mapfile using your layer and legend
definitions to reproduce this with your URL but I don't get this error.
I do get a legend with one item on it. I'll attach my test mapfile, you
may want to try it at your end.

If you still get this error with the latest version then perhaps you
could file a bug with a small testcase to reproduce and one of us can
have a look (your testcase should include mapfile, symbolset and
fontset, but data shouldn't be needed).

Daniel
--
------------------------------------------------------------
  Daniel Morissette               dmorissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------
-------------- next part --------------
MAP

EXTENT 1 1 10 10
SIZE 300 300

#
# http://sb1/cgi-bin/mapserv_43?map=/tmp/testlegend.map&request=getLegendGraphic&VERSION=1.1.1&LAYER=poi&FORMAT=text/html
#
# Start of legend
#
LEGEND
  STATUS ON
  KEYSIZE 40 20
  KEYSPACING 10 10
  IMAGECOLOR 128 128 128
  #OUTLINECOLOR 0 0 0
  LABEL
      COLOR 120 120 120
#      TYPE TRUETYPE
#      FONT "arial"
#      SIZE 12
       TYPE BITMAP
       SIZE MEDIUM
  END # END LABEL
END   #LEGEND

 LAYER
    NAME 'poi'
    STATUS ON
    CONNECTIONTYPE postgis
    CONNECTION 'user=pgsql dbname=test host=localhost'
    DATA "the_geom from poi"
    TYPE POINT
    PROJECTION
        'init=epsg:31494'
    END

    METADATA
      'WMS_SRS'    'epsg:31494'
      'WMS_TITLE'    'test'
      'WMS_FEATURE_INFO_MIME_TYPE'    'text/html'
    END

  CLASSITEM "symbol"
  CLASS
     NAME "Geldautomat"
     EXPRESSION /./
   MINSCALE 0
   MAXSCALE 1000
   STYLE
#      SYMBOL "geldautomat_50"
      SYMBOL 0
      SIZE 10
   END
  END

END #LAYER

END #MAP


More information about the mapserver-users mailing list