Fwd: [Mapserver-dev] Speed Improvement #3 (I am on a roll :-)

Frank Warmerdam warmerdam at pobox.com
Tue Nov 11 09:44:01 EST 2003

Steve Lime wrote:
> Any objections to this change?
> Steve

Alan wrote:
> Hi,
> In new versions of GD (2.02 and above) gdAlphaBlending is turned on by
> default. This causes a speed decrease of about 6x.
> inside msImageCreateGD:
>         if( format->imagemode == MS_IMAGEMODE_RGB || format->imagemode ==
>             image->img.gd = gdImageCreateTrueColor(width, height);
>             /* AJS - alans at wunderground.com turn this off by default? will
> ndfd work? */
>             gdImageAlphaBlending( image->img.gd, 0);
>         } else
>>From looking in the mapserver code (mapgd.c) it seems as if mapserver is
> doing its own alpha blending, so this should always be off unless drawing
> truetype fonts. (the code already works)

Sorry for not responding the first time around.  I missed it assuming it
related to the other speed improvements that didn't pertain to me (though
they are great!).

It is fine to disable alpha blending here, and in keeping with the way the
code was working.  However, we do turn on the alpha blending temporarily in
a number of places (drawing text and symbols) in order to get correct

Best regards,

I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the mapserver-dev mailing list