4

Sorry for my English, I'm a French speaker :D

I would like resize thousands of objects with the same height, but with different widths, and the goal of keeping each of their original aspect ratios.

I've found this discussion:
Inkscape 0.91: Scaling several objects while keeping their original location

If I choose % it will increase all objects, but with different heights. If I choose PX and I set a number in pixels 300px for example, the individual aspect ratios are not kept ! :'(

A script for achieving exactly the result I want is part of this question and answer:
Batch script to resize height of all layers to same height but keeping their original aspect ratio

But it's specifically written to work for Photoshop :/

Does anyone know how to reproduce this same method in a script for Inkscape?

Thanks for your Help!

2 Answers 2

4

If I get you correctly, you want this:

  • Switch to selection tool
  • Create an object that has the height you need
  • Copy the object to the clipboard
  • Activate the lock icon in the selection tool's tool controls
  • Select all the objects that you want to have that height
  • Select Edit > Paste Size > Paste height separately

Do you still need to script this, or is this enough for your needs?

3
  • Just a big Thank you ! This is a very good answer. I knew that I didn't need a script for that, but answers I had from a french forum insisted to script it :/ Thanks a lot ! Have a very nice day, take care :)
    – Ginette
    Mar 30, 2020 at 19:53
  • In my case, it changes the height but the corresponding width is wrong. In other words, the aspect ratio of each object is not respected. Any idea why that happens?
    – Boson Bear
    Nov 18, 2021 at 13:47
  • @BosonBear Is the lock icon active and are you using a current Inkscape version? Some intermediate version broke this (don't remember which, 1.0, maybe?), but it works in 1.1.1.
    – Moini
    Nov 21, 2021 at 16:56
0

It's simple with Image Resizer for Windows.

https://www.microsoft.com/en-us/p/image-resizer-for-windows-10/9nwwmh081ddb?activetab=pivot:overviewtab

  • select all the pictures you want to resize
  • right-click the selected files to bring up the quick menu
  • click "Resize Pictures"
  • select "Custom"
  • set your desired dimensions (width x height)
  • [since you mentioned you want the heights all the same, but the widths will vary, just oversize the width number to a dimension bigger than any of the final pictures will be]
  • uncheck "Make pictures smaller by t not larger"
  • uncheck "Resize the original pictures (don't create copies) [at least until you're comfortable with the utility]
  • click "OK"

See screenshot of the dialog box:

screenshot of the dialog box

1
  • I guess you misinterpreted the question. It is about 1000 objects in one image, not 1000 images. Mar 31, 2020 at 22:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.