3

The issue is that if my script is correctly done, a SVG is supposed to be exported to PNG with a fixed width, the script seems to work fine, but when I check it out again on Inkscape*, it shows me the original SVG size, not the resized PNG exported picture.

Here's a folder with the script and a random SVG I'm using for testing.


*To check the size of the picture in Inkscape, we need to change the units in the top bar, and then see the numbers that shows. The screenshot shows a 14,79 cm x 9,85 cm, instead of 10,5 cm x 6,9 cm.

you are viewing a single comment's thread
view the rest of the comments
[-] Moshpirit@lemmy.world 1 points 1 year ago* (last edited 1 year ago)

Oh! Cool tool!! I have a doubt, though.

  • If I use rsvg-convert --width=1050mm --keep-aspect-ratio svg.svg > reduced.png, the dimensions of the picture I get are 105,01 x 69,96 cm.
  • But if I add --dpi-x=300 --dpi-y=300 to the command, rsvg-convert --dpi-x=300 --dpi-y=300 --width=1050mm --keep-aspect-ratio svg.svg > reduced.png, the dimensions are 328,14 x 218,55 cm.

Is there any way to set the pixel density while keeping the width fixed?

I mean, there's a big difference between the picture in PNG and SVG when I see them both on Inkscape side by side, I want the PNG (left) to has the resolution of the SVG (right) while keeping the dimensions.

this post was submitted on 28 Aug 2023
3 points (100.0% liked)

Inkscape

255 readers
1 users here now

A community for users of Inkscape, the free and open source vector graphics editor.

All posts should clearly indicate the origin of artwork, or it must be clear from the article, video or page linked. Original content (created by the poster) should contain [OC] in the title.

founded 1 year ago
MODERATORS