RSS Subscription
Linux Howtos & Tutorials

Enter your email:

Delivered by


NOTE:New tutorials are from LinuxCareer.com

Poll

Do you own or wish to have iPhone?
 


Linux eBooks FREE Download
A guide to programming Linux kernel modules
Introduction to Linux - A Hands on Guide
A Newbie's Getting Started Guide to Linux

Linux from Scratch - Create Your Own Linux System - Free eBook

Linux: The Hacking Solution (v.3.0)

SQLite 3 with PHP Essential Training – Free Video Training Tutorials

This guide will introduce you to the world of GNU/Linux

The GNU/Linux Advanced Administration

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)

Advanced Bash-Scripting Guide

Set up, maintain, and secure a small office email server

Partner Linux Sites:
How-To.LinuxCareer.com
Jobs.LinuxCareer.com
TuxMachines
Monsterb
LinuxBloggers
AdamsInfo
LinuxScrew
All For Linux

Batch image resize using linux command line

Question:

How can I batch resize of multiple images using ubuntu linux command line? Is there any tool which would help me with this and/or is there GUI application which makes image resizing easy. I have hundreds of images and therefore I'm in need of such a tool.

Answer:

The best and the easiest way to resize multiple images using linux command line is to use imagemagick tools. First you need to install imagemagick package:

# apt-get install imagemagick

Once installed you will have multiple image processing tools available to our disposal, such as convert, identify and etc.

identify command will help you to get some image information and convert will help you to convert images between hundreds of different image formats as well as it will easily resize any image submitted as an argument. Let's suppose that our current working directory contains multiple image files with extension *.jpg . To resize all images to a half size of their original size we can combine bash for loop and convert command together in a following manner:

$ for i in $( ls *.jpg); do convert -resize 50% $i re_$i; done

The command above will resize all images to half of its original size. New resized images will be saved with a prefix "re_". It is also possible to resize all images and at the same time convert them to gif format:

$ for i in $( ls *.jpg); do convert -resize 50% $i $i.gif; done

When it comes to GUI application which are able of batch image resizing you might look at Converseen .
Linux questions and answers

Share this linux post:

Submit Batch image resize using linux command line in Delicious Submit Batch image resize using linux command line in Digg Submit Batch image resize using linux command line in FaceBook Submit Batch image resize using linux command line in Google Bookmarks Submit Batch image resize using linux command line in Stumbleupon Submit Batch image resize using linux command line in Technorati Submit Batch image resize using linux command line in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.


Linux eBooks FREE Download