TransWikia.com

Resizing images keeping the same pixel ratio

Ask Ubuntu Asked by Bijendra on December 6, 2021

Using Ubuntu 10.10.

I want to resize images keeping the same pixel ratio. Currently I have images with 300300. I want to crop the images but want the ratio 300300 to be maintained.

Which tool/plugin/software can I use for Ubuntu?

One Answer

This can be done from terminal. How to Quickly Resize, Convert & Modify Images from the Linux Terminal:

ImageMagick will try to preserve the aspect ratio if you use this command. It will alter the image to fit within a 200×100 area, but the image may not be exactly 200×100. If you want to force the image to become a specific size – even if it messes up the aspect ratio – add an exclamation point to the dimensions:

convert example.png -resize 200×100! example.png

You can also use GIMP.

GIMP is expandable and extensible. It is designed to be augmented with plug-ins and extensions to do just about anything. The advanced scripting interface allows everything from the simplest task to the most complex image manipulation procedures to be easily scripted.

Source: http://docs.gimp.org/en/introduction.html

To install GIMP, you can run

sudo apt-get install gimp

Answered by Mitch on December 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP