Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 24d9101 commit 57113fbCopy full SHA for 57113fb
1 file changed
src/_backend_agg.cpp
@@ -2239,7 +2239,12 @@ RendererAgg::tostring_rgba_minimized(const Py::Tuple& args)
2239
2240
int newwidth = 0;
2241
int newheight = 0;
2242
+ #if PY3K
2243
+ Py::Bytes data;
2244
+ #else
2245
Py::String data;
2246
+ #endif
2247
+
2248
if (xmin < xmax && ymin < ymax)
2249
{
2250
// Expand the bounds by 1 pixel on all sides
@@ -2269,7 +2274,11 @@ RendererAgg::tostring_rgba_minimized(const Py::Tuple& args)
2269
2274
}
2270
2275
2271
2276
// The Py::String will take over the buffer
2272
- data = Py::String((const char *)buf, (int)newsize);
2277
2278
+ data = Py::Bytes((const char *)buf, (int) newsize);
2279
2280
+ data = Py::String((const char *)buf, (int) newsize);
2281
2273
2282
2283
2284
Py::Tuple bounds(4);
0 commit comments