node-mapnik
node-mapnik copied to clipboard
max_size is ambiguously defined in the docs
The check to see if the SVG is too large checks width and height separately while the documentation states that max_size is the maximum allowed size of the svg dimensions * scale.
Reading this over a few times, I think this is a correct statement, but on first pass the docs seemed to imply area width * height * scale^2 while the code enforces longest side Math.max(width, height) * scale.
As the goal of this check is to make sure too much memory is not allocated for an Image, it seems that the area of the image is what we should be enforcing here. Does that sound right @flippmoke and @springmeyer?
@mcwhittemore - area 👍
Thanks @artemp. I'll make a PR to fix this.