[Mapguide-trac] [mapguide-trac] #743: AGG Renderer does not properly handle transparency for non-PNG image formats
MapGuide Open Source
trac_mapguide at osgeo.org
Wed Oct 3 00:22:05 PDT 2012
#743: AGG Renderer does not properly handle transparency for non-PNG image
formats
---------------------------------+------------------------------------------
Reporter: gingerbbm | Owner:
Type: defect | Status: new
Priority: medium | Milestone: 2.4
Component: Rendering Service | Version: 2.2.0
Severity: major | Keywords:
External_id: |
---------------------------------+------------------------------------------
Comment(by bscott):
Hi jackie,
This patch only works if the resulting palette_scaling_maxval is 255.
If the palette_scaling_maxval is lower than 255 we have to scale down all
the map palette colors so the resulting png palette will be remap
correctly.
palette[i].a = (c.alpha() * (palette_scaling_maxval) + (255) / 2 ) /
(255);
palette[i].r = (c.red() * (palette_scaling_maxval) + (255) / 2 ) /
(255);
palette[i].g = (c.green() * (palette_scaling_maxval) + (255) / 2 ) /
(255);
palette[i].b = (c.blue() * (palette_scaling_maxval) + (255) / 2 ) /
(255);
We end up with a palette_scaling_maxval < 255 when we have a lot of colors
in the map. Having a aerial picture in the background produce that effect
all the times.
Bruno
--
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/743#comment:16>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals
More information about the mapguide-trac
mailing list