[mapserver-dev] Rendering a circle with the specified size as the default symbol

thomas bonfort thomas.bonfort at gmail.com
Sun Feb 8 03:39:21 EST 2009


On Fri, Feb 6, 2009 at 15:09, Tamas Szekeres <szekerest at gmail.com> wrote:
> Hi Thomas,
>
> Yes it looks like a big effort indeed.
> Would it be up to the renderer how their image representation is stored
> internally? It seems like the various renderers would use different
> parameretes in imageObj, so would it somewhat to be represented as an
> untyped parameter (void* for example) or we expect all of those would
> represent the images as raw RGBA rasters?
For all but raster handling, mapserver should be agnostic of the image
internal representation. A new image is created by the vtable
createImage function, and the return value is then used for all
subsequent operations, through the other vtable calls.


> Or they should provide their I/O
> operations between  their internal representation and the RGBA efficiently?
For raster handling, this could be the case, although accessing this
function pixel by pixel will be too costly performance-wise. I see two
main steps here:
* modify the raster handling code so it can output directly to an rgba
structure defined by its width, height, stride(and eventually pixel
format, although supporting more than uchar probably isn't very
usefull). This has to be done because the the current GD
representation of a single pixel is incompatible with all the other
renderers.
* have the renderers either present a direct acces to their rgba data
structure so gdal/mapraster can directly write into it, and/or have
the renderers present a vtable function for blending in a rgba raster
array (as direct pixel access doesn't always make sense, eg for pdf,
svg, etc...)

> I guess not all of the renderers would have builtin support for outputting
> png or jpeg images therefore this option should be pulled outside of the
> scope of the renderers in addition.
I still haven't looked deeply into this. I think there will be two
different code paths here:
* have the renderers implement a vtable saveImage function
* have the renderers export a rgba raster, and use a common mapserver
saveImage function (in order to not have to duplicate the
outputformat's formatoptions in each renderer)

best regards,

thomas


More information about the mapserver-dev mailing list