Closed jakepruitt closed 9 years ago
Upstream in node-mapnik: mapnik.blend
should accept zero-length arrays
@tmcw any way we could change our usage of mapnik.blend
to image.composite
as described in #7?
@springmeyer or @flippmoke, are there specific reasons mapnik.blend
throws an error for zero-length arrays?
So! PNG images can't be 0x0. How about a blank response?
I don't think it makes sense to feed spritezero an empty array and expect it to respond with a valid (blank) png. It actually seems logical for spritezero to only work if the the array length > 0.
@bsudekum Why not? It simplifies all the downstream code and eliminates an unnecessary boundary condition.
this is done
Currently, passing an empty array into
spritezero.generateImage
throws an error (ref #10). The better behavior would be to return an empty PNG, possibly with an error that indicated that the image layout did not have any SVG's.