rollback png8 default in 2.3.x - closes #2110
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
After Width: | Height: | Size: 157 KiB |
After Width: | Height: | Size: 140 KiB |
After Width: | Height: | Size: 156 KiB |
After Width: | Height: | Size: 985 B |
After Width: | Height: | Size: 851 B |
BIN
tests/python_tests/images/support/encoding-opts/blank-png32.png
Normal file
After Width: | Height: | Size: 915 B |
After Width: | Height: | Size: 334 B |
After Width: | Height: | Size: 270 B |
BIN
tests/python_tests/images/support/encoding-opts/solid-png32.png
Normal file
After Width: | Height: | Size: 334 B |
|
@ -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'
|
||||
]
|
||||
|
||||
|
|