Mobile app version of vmapp.org
Login or Join
Jessie844

: How to batch add whitespace to rectangular images so they all will be square? I have a lot of various sized rectangular images. I would like to keep them centered, do not change their size

@Jessie844

Posted in: #Imagemagick #Svg

I have a lot of various sized rectangular images. I would like to keep them centered, do not change their size and only add white space, so every image would be square. After that, I want to convert that square to PNG. I tried few commands in ImageMagick, but couldn't get expected result.

That command gives me almost expected result, however, SVG gets blurry:

magick mogrify *.svg -resize '128x128'-gravity center -extent '128x128' *.svg


What I want to do:


Resize SVG to square SVG
Do some work with SVG
Then export it to 128x128 PNG

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Jessie844

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme