rsvg-convert image size isn't consistent when millimeter unit is used in document's width and height
Issue Summary
echo '<svg height="100mm" width="100mm" />' | rsvg-convert -h 60 /dev/stdin | file -
/dev/stdin: PNG image data, 61 x 60, 8-bit/color RGBA, non-interlaced
When millimeter unit is used rsvg-convert's output width and height doesn't match on -h 60
and -h 120
.
Note file
's output is 61x60 and not 60x60. It happens at 120 also.
Example SVG
<svg height="100mm" width="100mm" />
Which is reduced from an actual Inkscape file.
Librsvg Version
rsvg-convert version 2.56.0
Platform
macOS 13.4, happens on a Linux box I've access also.
Additional logs
echo '<svg height="100mm" width="100mm" />' | RSVG_LOG=1 rsvg-convert -h 60 /dev/stdin
didn't give me any log.
Pretty sure some funny floating point conversion issue is going on here, I thought however it can be nice to have this resolved otherwise one easily can use something like -w 60
also to tackle this.
Edited by ebraminio