Wednesday, 18 January 2012

Batch resizing of the image folder through Linux command

Many a times developer need to resize the image in fixed parameter in batch
Here is the linux command based image resize where we can resize the images in whole folder
Step 1. Go to image folder.
Step 2. Create a new folder resized (whatever suitable for you) to put the resized image
Step 3. If you like to fix the width constant e.g 110px then go for this command

for ff in *.jpg
convert -verbose -resize 110 $ff resized/$ff

Step 4. Check the "resized" folder for resized image.
Step 5. If you like to fix the height suppose 140px than go for command

for ff in *.jpg
convert -verbose -resize x140 $ff resized/$ff

1 comment :

  1. I would like to give thanks so much for your job you have made in writing this posting. I am hoping the same most reliable job by you in the future too.