[mapguide-internals] RFC 40 - Support for using the AGG renderer

Frank Warmerdam warmerdam at pobox.com
Fri Oct 19 17:17:44 EDT 2007


Paul Spencer wrote:
> I am concerned about maintaining a fork independently of MapServer and 
> other OSGeo projects that might use AGG.  I propose that the fork be 
> maintained in a separate repository on OSGeo infrastructure with the 
> intention of involving at least the MapServer folks, and possibly others 
> that care since they have the same license issues.  Initially, commit 
> access can be limited to Traian ;)

Paul,

I'm not sure that it is important to keep the AGG fork in a distinct
respository, but I would certainly like this looked at as a distinct
component that could be shared between projects.

> I am assuming that the AGG renderer will render into a GD buffer and GD 
> will still be used to do image I/O.  Is this correct?
> 
> MapServer 5.0 includes a capability to convert PNG24 into PNG8 with a 
> predetermined palette of colours that must be preserved during the 
> quantization process.  I would recommend that this is looked at as part 
> of this work and perhaps made available as an option.
> 
> There is a known issue with GD and how it handles the alpha channel that 
> made it impossible to support alpha transparency between layers when 
> MapServer implemented AGG.  I believe the issue was that GD had a 
> non-standard way of looking at the 4th byte in a 32 byte buffer, more of 
> an opacity rather than transparency (or the other way around).  Are you 
> aware of this issue and prepared to work around it?  I believe the 
> current maintainer of GD (part of PHP now) is aware of the issue and may 
> fix it in a future version.

I believe AGG treats a 4th byte value of 0 as opaque and a value of 127
as transparent with the "high bit" reserved for another purpose.  I don't
exactly recall the details.  But this is a design decision and not likely
to be changed.  It is *not* a bug.

This was really only a problem in MapServer were we wanted AGG to render
into a gdImage buffer, and render some layers with AGG and some layers with
GD. It wasn't obvious from my skim of the RFC that this would be an issue
for MapGuide.

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    | President OSGeo, http://osgeo.org



More information about the mapguide-internals mailing list