Technical Solutions

Resizing Images

Posted Friday, 29 January 2016 00:00

As a web designer I often have to resize a large number of images. Here are a couple of the commands I use. These use the ImageMagick application.

To recursivly resize images over 2000px width while preserving teh images aspect ratio and  ignoring smaller images

find . -iname "*.jpg" -exec convert "{}" -resize '2000>' "{}" \;

you can add -quality 90 to further reduce the size

To recursivly crop an image

for file in ./*.jpg; do convert "$file" -gravity Center -shave 20x20 "./out/${file%.JPG}"; done;

Read 836 times Last modified on Friday, 29 January 2016 10:25

Contact

Invalid Input
Invalid e-mail address
Invalid Input
Invalid Input
Invalid Input
This form collects your name , email, and phone number so that we can get back to you. Please indicate that you consent to this below and then you will be able to contact us via this form.
Invalid Input

Find Us

 

Contact Details

Sussex PC Works
9 Barclays Court,
Skeyne Drive,
Pulborough RH20 2BG
UK

Tel: 01903680683

©2018 Rhino All rights reserved

This site uses cookies and other tracking technologies to assist with navigation and analyse your use of our website and services.