You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading the OSM tile server to mapink-2.0.0 the export script started returning the error below:
{{{
Traceback (most recent call last):
File "/usr/lib/cgi-bin/export", line 135, in
jpeg = image.tostring("jpeg")
RuntimeError: palettes are not currently supported when writing to jpeg format
}}}
This seems to fix it by removing the unnecessary empty palette from tostring2:
{{{
--- ./bindings/python/mapnik_image.cpp~ 2011-09-26 11:30:24.000000000 +0100
+++ ./bindings/python/mapnik_image.cpp 2011-10-02 18:06:18.000000000 +0100
@@ -79,8 +79,7 @@
// encode (png,jpeg)
PyObject* tostring2(image_32 const & im, std::string const& format)
{
mapnik::rgba_palette pal;
std::string s = save_to_string(im, format, pal);
std::string s = save_to_string(im, format);
return
#if PY_VERSION_HEX >= 0x03000000
::PyBytes_FromStringAndSize
}}}
A similar fix is probably required for image views in view_tostring2
The text was updated successfully, but these errors were encountered:
After upgrading the OSM tile server to mapink-2.0.0 the export script started returning the error below:
{{{
Traceback (most recent call last):
File "/usr/lib/cgi-bin/export", line 135, in
jpeg = image.tostring("jpeg")
RuntimeError: palettes are not currently supported when writing to jpeg format
}}}
This seems to fix it by removing the unnecessary empty palette from tostring2:
{{{
--- ./bindings/python/mapnik_image.cpp~ 2011-09-26 11:30:24.000000000 +0100
+++ ./bindings/python/mapnik_image.cpp 2011-10-02 18:06:18.000000000 +0100
@@ -79,8 +79,7 @@
// encode (png,jpeg)
PyObject* tostring2(image_32 const & im, std::string const& format)
{
return
#if PY_VERSION_HEX >= 0x03000000
::PyBytes_FromStringAndSize
}}}
A similar fix is probably required for image views in view_tostring2
The text was updated successfully, but these errors were encountered: