inkscape - command line - Keep Aspect ratio when resizing to specific width/height

Bug #1795676 reported by Nicklas Holmgren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Wishlist
Unassigned

Bug Description

When using command line resizing today you'd do something like this:
inkscape.exe -f=myInputSvg.svg -e=myOutputFile.png -w=400 -h=400 -z

Then the resulting image will be 100% wide and 100% high which is all fine and dandy, however it can look very squeezed.

You might not want such a result, you might want keep the aspect ratio of the original svg.
So a suggestion would be to add a parameter -keepAspect or -maintainAspect

Which would still make a 400x400 image however the actual drawing inside will be centered inside to 200x400 or 400x200 depending on the shape of the original svg.

This is a suggestion and something which I am in need with.

Here's what I used to export the png in the comments below:
"c:\program files\inkscape\inkscape.exe" -z -f=sportscar3.svg -e=sportcar.png -w=400 -h=400

Revision history for this message
Nicklas Holmgren (elrinth) wrote :

this is an example of how sportcar was exported if I wanted a 400x400 image. There is no way to keep the proportions today.

Revision history for this message
Nicklas Holmgren (elrinth) wrote :

here is the original svg I used (found on google search) found here:
http://tuxpaint.org/stamps/stamps/vehicles/auto/sportscar3.svg

description: updated
Mc (mc...)
tags: removed: suggestion
Changed in inkscape:
importance: Undecided → Wishlist
Revision history for this message
Kelson Pereira (kpereira) wrote :

This is a good suggestion to export the png and preserve the aspect ratio.

Is there a planning to do that feature?

Regards,

tags: added: bug-migration
Revision history for this message
grey tomorrow (gtomorrow) wrote :

Hi - thanks for reporting this bug, I've manually migrated it to Inkscape's new bug tracker on GitLab, and closed it here.

Please feel free to file new bugs about the issues you're seeing at http://inkscape.org/report.

Moved to: https://gitlab.com/inkscape/inbox/issues/1189
Closed by: https://gitlab.com/greytomorrow

Changed in inkscape:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.