rollback png8 default in 2.3.x - closes #2110

This commit is contained in:
Dane Springmeyer 2014-08-12 13:50:32 -07:00
parent 6c3301d8eb
commit 35f7314e92
12 changed files with 11 additions and 14 deletions

View file

@ -40,9 +40,6 @@ Summary: TODO
- Moved `label-position-tolerance` from unsigned type to double
- Default PNG encoding method when `png` is supplied is now `png8:m=h`, so paletted png using hextree color quantization (#2028)
Use `png32` now for full color png. More details at https://github.com/mapnik/mapnik/wiki/Image-IO.
- Added support for more seamless blurring by rendering to a larger internal image to avoid edge effects (#1478)
- Fixed rendering of large shapes at high zoom levels, which might dissapear due to integer overflow. This

View file

@ -133,27 +133,27 @@ void save_to_file(T const& image,
void handle_png_options(std::string const& type,
png_options & opts)
{
if (type == "png" || type == "png8" || type == "png256")
{
// stick with defaults
return;
}
else if (type == "png24" || type == "png32")
if (type == "png" || type == "png24" || type == "png32")
{
opts.paletted = false;
return;
}
else if (type == "png8" || type == "png256")
{
opts.paletted = true;
return;
}
boost::char_separator<char> sep(":");
boost::tokenizer< boost::char_separator<char> > tokens(type, sep);
bool set_colors = false;
bool set_gamma = false;
BOOST_FOREACH(std::string const& t, tokens)
{
if (t == "png" || t == "png8")
if (t == "png8" || t == "png256")
{
opts.paletted = true;
}
else if (t == "png24" || t == "png32")
else if (t == "png" || t == "png24" || t == "png32")
{
opts.paletted = false;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 985 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 851 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 334 B

View file

@ -18,8 +18,8 @@ if mapnik.has_png():
os.makedirs(tmp_dir)
opts = [
'png',
'png:t=0',
'png32',
'png32:t=0',
'png8:m=o',
'png8:m=o:c=1',
'png8:m=o:t=0',
@ -32,7 +32,7 @@ if mapnik.has_png():
'png8:m=h:c=1:t=0',
'png8:m=h:t=1',
'png8:m=h:t=2',
'png:e=miniz',
'png32:e=miniz',
'png8:e=miniz'
]