Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Using ubuntu 10.10. I want to resize images keeping the same pixel ratio. Currently i have images with 300*300 .Now i want to crop the images but want that the ratio 300*300 be maintained. Which tool/pluginsoftware can i use for ubuntu.

share|improve this question

1 Answer 1

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

Now, to install Gimp, you can:

Or

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the commands below.

sudo add-apt-repository ppa:lucid-bleed/ppa
sudo apt-get update
sudo apt-get install gimp
share|improve this answer
    
convert: invalid argument for option `-resize': 200×200! @ error/convert.c/ConvertImageCommand/2343. I got this error while running the above command. Any idea –  Bijendra Jun 11 '12 at 9:12
    
Did you replace the example.png with the name of you image in both locations? :) –  Mitch Jun 11 '12 at 11:18
    
yes i did it.. convert product_1_green_1.png -resize 490×490! product_1_green_1.png –  Bijendra Jun 11 '12 at 16:05
    
So it did work? –  Mitch Jun 11 '12 at 16:12
    
nop.. sorry for the confusion.. It did't worked, what i meant to say was i changed the image file names. –  Bijendra Jun 12 '12 at 4:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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