Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

handle demultiplying the png before saving - solves gray halo reporte…

…d in #1312 (when testing with svg2png utility)
  • Loading branch information...
commit 5da14ef9e96feda820fdf0a325832285b8b129c6 1 parent 3de5c4f
@springmeyer springmeyer authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 utils/svg2png/svg2png.cpp
View
5 utils/svg2png/svg2png.cpp
@@ -142,7 +142,7 @@ int main (int argc,char** argv)
continue;
}
- typedef agg::pixfmt_rgba32_plain pixfmt;
+ typedef agg::pixfmt_rgba32_pre pixfmt;
typedef agg::renderer_base<pixfmt> renderer_base;
typedef agg::renderer_scanline_aa_solid<renderer_base> renderer_solid;
agg::rasterizer_scanline_aa<> ras_ptr;
@@ -173,12 +173,13 @@ int main (int argc,char** argv)
mapnik::svg::svg_renderer_agg<mapnik::svg::svg_path_adapter,
agg::pod_bvector<mapnik::svg::path_attributes>,
renderer_solid,
- agg::pixfmt_rgba32_plain > svg_renderer_this(svg_path,
+ agg::pixfmt_rgba32_pre > svg_renderer_this(svg_path,
(*marker.get_vector_data())->attributes());
svg_renderer_this.render(ras_ptr, sl, renb, mtx, opacity, bbox);
boost::algorithm::ireplace_last(svg_name,".svg",".png");
+ im.demultiply();
mapnik::save_to_file<mapnik::image_data_32>(im.data(),svg_name,"png");
if (auto_open)
{
Please sign in to comment.
Something went wrong with that request. Please try again.