neocotic / convert-svg

Node.js packages for converting SVG into other formats using headless Chromium
MIT License
200 stars 47 forks source link

convert-svg-to-png crops when used small PNG size #59

Closed lietusme closed 2 years ago

lietusme commented 5 years ago

Tried using 10x10 dimensions on such SVG file: test.svg.zip

But it generated cropped version: test

It scales properly on larger dimensions. Inkscape editor is able to scale it properly.

neocotic commented 2 years ago

I'm sorry for the incredibly long delay in replying in responding to you but life sometimes gets in the way of OSS development. I thank you for your patience and, although I'm closing this issue out, I hope you'll be glad to know that I believe this issue has been resolved in with today's 0.6.0 release with the introduction of a new rounding API and API option that you can use to control how you'd like dimensions to be rounded (ceil, floor, or round - default). However, this may in fact be a limitation of our use of Chromium internally to scale and convert the SVGs.

If you continue to have this problem, please raise a new ticket with an SVG to reproduce the problem and, where possible, an expected and actual file of the output. I hope you can understand my delay.