Page 1 of 1
Forum

Welcome to the Tweaking4All community forums!
When participating, please keep the Forum Rules in mind!

Topics for particular software or systems: Start your topic link with the name of the application or system.
For example “MacOS X – Your question“, or “MS Word – Your Tip or Trick“.

Please note that switching to another language when reading a post will not bring you to the same post, in Dutch, as there is no translation for that post!



How to quickly batc...
 
Share:
Notifications
Clear all

[Solved] How to quickly batch resize images (JPEG) from the command line

1 Posts
1 Users
0 Reactions
1,268 Views
 Hans
(@hans)
Famed Member Admin
Joined: 12 years ago
Posts: 2880
Topic starter  

Sometimes I have to send a boat load of pictures (examples) to a friend, and to make it acceptable for email, I resize them.

First, copy the JPEGs in one folder - so we're not going to work with the originals.
Next, open a Shell window (Applications -> Utilities -> Terminal) and go to that folder, and type:

sips -Z 640 *.JPG

(if the extension of your files are capitalized)

In seconds all your pictures that en with .JPG, will be resize to 640 pixels wide, while maintaining aspect ratio (-Z). It's fast and effective.

Note: to optimize even more I use ImageOptim (article is written for PNG, but works also on JPG files and is VERY fast) to make the files even smaller. After that I zip them at maximum compression (not that it really makes things smaller) so it's all conveniently in one single file, which is much easier for the receiving party to save their attachment.


   
ReplyQuote
Share: