[Mapserver-dev] Possible bug with outlinecolor in label for RGB outputformat

Claude Philipona claude-mapserver at skirando.ch
Sat Sep 27 12:55:12 EDT 2003


Hello,

There is maybe a bug when OUTLINECOLOR is set with truetype label in RGB
OUTPUTFORMAT (jpeg/png24). There outline appears as "square" instaed as
"line" around the letters label.

All the where made with a simple call to a mapfile, using
Mapserver4.0/PHPMapscript. You'll find the mapfile at the end of this
message.
GD 2.0.15
Freetype 2.1.5
Gdal 1.1.9

Result with IMAGETYPE png (8bit), everything is ok, the outline is present:
http://www.camptocamp.com/~claude/mapserver/test_label_png.png

Result with IMAGETYPE png24 (24bit), no outlines, but square:
http://www.camptocamp.com/~claude/mapserver/test_label_png24.png

Result with IMAGETYPE jpeg (24bit) same as png 24 (squares instead of
outlines):
http://www.camptocamp.com/~claude/mapserver/test_label_jpg.jpg

Then I tried several configuration:
When I set POSTLABELCACHE ON and TRANSPARENCY 100 on the layer, the
OUTLINES are ok, but now (of course) label collision occurs:
http://www.camptocamp.com/~claude/mapserver/test_label__post_label_cache_transparency_100_png24.png

With  POSTLABELCACHE ON or TRANSPARENCY 100 settings alone, the outlines
are not set properly either:
http://www.camptocamp.com/~claude/mapserver/test_label_transparency_100_png24.png
http://www.camptocamp.com/~claude/mapserver/test_label__post_label_cache_png24.png


This behaviour is quite annoying, because it is apperently impossible to
have nice OUTLINES in RGB formats without POSTLABELCACHE ON and
TRANSPARENCY 100, and often we don't want to use these two settings becaus
of the side effect.

Is this a know bug (I couldn't find one in bugzilla)?

Claude



NAME TEST
STATUS ON
SIZE 600 450

SYMBOLSET "symbols_1.sym"
EXTENT 532500 152180 534340 152880
UNITS METERS

SHAPEPATH "../shapes"
TRANSPARENT OFF

IMAGETYPE png24

IMAGECOLOR 210 190 190
FONTSET "etc/fonts.txt"
WEB
  MINSCALE 0
  MAXSCALE 40000
  IMAGEPATH "/var/www/test2/htdocs/tmp/"
  IMAGEURL "/test2/tmp/"
END # WEB

LAYER
  NAME buildings
  TYPE POLYGON
  STATUS ON
  DATA "buildings"
  TRANSPARENCY 60
  CLASS
    NAME "BAT"
    STYLE
      COLOR 50 200 50
      OUTLINECOLOR 152 227 152
      SYMBOL 0
      SIZE 1
    END
  END
END

LAYER
  NAME "roads_label"
  TYPE ANNOTATION
  STATUS ON
  DATA "roads_label.shp"
  LABELITEM "Nom"
 #POSTLABELCACHE ON
 #TRANSPARENCY 100
  CLASS
    LABEL
      TYPE truetype
      FONT "arial"
      SIZE 10
      MINDISTANCE 300
      ANTIALIAS TRUE
      POSITION cc
      ANGLE AUTO
      COLOR 100 100 100
      OUTLINECOLOR 230 230 230
    END
  END
END

END # Mapfile



More information about the mapserver-dev mailing list