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

Traian Stanev traian.stanev at autodesk.com
Fri Oct 19 17:03:13 EDT 2007


Rendering will be done into a non-GD buffer. This is because GD has a
strange idea of what alpha is, and also it drops one bit of precision
from the alpha.

For PNG output, I wrote code to write the PNG directly, rather than go
via GD. Again, due to GD dropping one bit out of the alpha. For JPG and
GIF output, it goes via GD, since the alpha is not important in those
cases.

Alpha blending in AGG did not take into account blending over a
transparent background (maybe that's what you mean by transparency
between layers?). I wrote a new blender routine for agg to do that
correctly.


Traian


> -----Original Message-----
> From: mapguide-internals-bounces at lists.osgeo.org [mailto:mapguide-
> internals-bounces at lists.osgeo.org] On Behalf Of Paul Spencer
(External)
> Sent: Friday, October 19, 2007 4:47 PM
> To: MapGuide Internals Mail List
> Subject: Re: [mapguide-internals] RFC 40 - Support for using the AGG
> renderer
> 
> 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 ;)
> 
> 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.
> 
> Cheers
> 
> Paul
> 
> On 19-Oct-07, at 4:35 PM, Tom Fukushima wrote:
> 
> > Hi,
> >
> > Please take a look at "RFC 40 - Support for using the AGG renderer"
> > (http://trac.osgeo.org/mapguide/wiki/MapGuideRfc40) and post
> > feedback to
> > the list.
> >
> > Thanks
> > Tom
> > _______________________________________________
> > mapguide-internals mailing list
> > mapguide-internals at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/mapguide-internals
> 
> +-----------------------------------------------------------------+
> |Paul Spencer                          pspencer at dmsolutions.ca    |
> +-----------------------------------------------------------------+
> |Chief Technology Officer                                         |
> |DM Solutions Group Inc                http://www.dmsolutions.ca/ |
> +-----------------------------------------------------------------+
> 
> 
> 
> 
> 
> _______________________________________________
> mapguide-internals mailing list
> mapguide-internals at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-internals




More information about the mapguide-internals mailing list