Single Line Command to resize all your images in linux

Posted: December 15, 2011 in Linux
Tags: , , , , ,

I love linux only because it makes the work very simple.. So many inbuilt softwares which are commonly needed available in it. One of them is image editing.. Today , i was looking for image resizing software and at last i found an inbuilt tool which does an excellent job..

All you need to know is one command

$ convert -resize 50% input.jpg output.jpg

thats it.. the file input.jpg will be reduced to 50% and will be saved as output.jpg in the same folder .
If you have a collection of images to be resized. Keep it in a single folder and follow this command

$ convert -resize 50% *.jpg output.jpg

It will convert all your images and will save as output0.jpg, output1.jpg etc..

You can vary the resizing percentage according to your interest.

now, if you need to convert a jpg image to png,,just alter the command

$ convert input.jpg output.png

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s