Fwd: [Mapserver-dev] Speed Improvement #3 (I am on a roll :-)
Alan Steremberg
alans at wunderground.com
Tue Nov 11 11:25:59 EST 2003
I noticed two things in the code. It seems that when alpha blending is
needed (truetype fonts, etc) it is toggled on/off. Which is fine - I am
not opposed to using alpha blending when it is needed. Also, the alpha
blending layers does not use gd's alpha support, it is done in the
mapserver code.
Alan
On Tue, 11 Nov 2003 6:56am, Frank Warmerdam wrote:
> Steve Lime wrote:
>> Any objections to this change?
>> Steve
>
> Alan wrote:
>> Hi,
>> IMPORTANT!!
>> 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
>> ==
>> MS_IMAGEMODE_RGBA ) {
>> 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
> behaviour.
>
> 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
>
>
> _______________________________________________
> Mapserver-dev mailing list
> Mapserver-dev at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-dev
--
Alan Steremberg
More information about the mapserver-dev
mailing list