Export png NOT maintaing the aspect ratio

Post questions on how to use or achieve an effect in Inkscape.
hgdagon
Posts: 11
Joined: Wed Apr 02, 2014 1:26 pm

Export png NOT maintaing the aspect ratio

Postby hgdagon » Sun Dec 20, 2015 8:37 pm

Hello. I have an image that was intentionally in wrong aspect. I traced it, and now I want to export it in the correct aspect ratio. How can I do that?

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Export png NOT maintaing the aspect ratio

Postby brynn » Sun Dec 20, 2015 9:01 pm

If you know what the original correct ratio was, you can change that in the Export PNG Image dialog. Set the Width and Height to whatever the original size was.

If you don't know what the original ratio was, there is no way to tell Inkscape to magically restore it to the original. It has to know specifically the old ratio/numbers.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Export png NOT maintaing the aspect ratio

Postby Lazur » Sun Dec 20, 2015 9:32 pm

Maybe scale the group to the right aspect ratio first?

Either change the height or the width, by typing in the w -h boxes with the padlock icon swithed off.
Or by pulling side handles of the bounding box.

hgdagon
Posts: 11
Joined: Wed Apr 02, 2014 1:26 pm

Re: Export png NOT maintaing the aspect ratio

Postby hgdagon » Sun Dec 20, 2015 10:00 pm

No, that doesn't work. Inkscape just adds white borders to the sides...

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Export png NOT maintaing the aspect ratio

Postby brynn » Sun Dec 20, 2015 10:04 pm

What doesn't work? Using Export PNG Image or scaling the image before exporting?

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Export png NOT maintaing the aspect ratio

Postby Lazur » Sun Dec 20, 2015 10:23 pm

White borders? Like the background is not transparent?
How come?

By default the background is transparent, it only appears white if you save as cairo png instead of exporting selected object/page,
or if you set it to be opaque.

hgdagon
Posts: 11
Joined: Wed Apr 02, 2014 1:26 pm

Re: Export png NOT maintaing the aspect ratio

Postby hgdagon » Sun Dec 20, 2015 10:53 pm

OK, I tried again from the beginning (re-traced the image and then corrected the height) and now it works. But it still would be nice if the export dialog allowed to "unlock" the aspect ratio, like Illustrator's "Save for web". When I tried to adjust the export dialog's height parameters, it would just crop the image, which is not really what people generally want when exporting to bitmap, right?

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Export png NOT maintaing the aspect ratio

Postby Lazur » Sun Dec 20, 2015 11:20 pm

In my humble opinion that stands for itself. Export an area how it appears on screen. Having separate scale factors for width and height would be much more confusing, people would complain their exported image is out of their aspect ratio because they didn't tick a padlock icon in a dialog.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Export png NOT maintaing the aspect ratio

Postby brynn » Mon Dec 21, 2015 4:18 am

I didn't realize Export PNG width and height are locked. Oh, I see. It's the export area, and not the image dimensions.

Since that's how it works, than I would follow Lazur's suggestion, and scale the image before you export.


Return to “Help with using Inkscape”