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
It's kind of an odd one, because the density is based on the width/height of the input SVG. Which is defined by the width/height attributes.
<svgwidth="20"height="20">
<!-- ... -->
</svg>
So sharp seems to only allow a max density of 2400, however if you where to change the the SVG to width/height 200 instead
<svgwidth="200"height="200">
<!-- ... -->
</svg>
Then you wouldn't need such a high density. If a viewBox is present on the SVG as it is in the case of green.svg then it'd 'just work' however I believe if it's missing a viewBox.... hmm I'm not actually sure what happens if we're missing a viewBox attribute would need to do some tests.
Steps to reproduce:
Use the CLI with:
http://localhost:8080/acme/[email protected]
Error: Expected number between 1 and 2400 for density but received 2880 of type number
With
https://cdn.jsdelivr.net/gh/maputnik/osm-liberty@gh-pages/svgs/svgs_iconset/airport_11.svg
this happens with
"width": 200, "height": 200
and@3x
.So for more complex SVGs this seems to happen at a lower width/height and pixel ratio.
The text was updated successfully, but these errors were encountered: