Tiger Mountain Technologies Forum Index Tiger Mountain Technologies
Technical support bbs for Tiger Mountain Technologies and LewisCounty.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Converting images using imagemagic in DOS

 
Post new topic   Reply to topic    Tiger Mountain Technologies Forum Index -> Open Source Software
View previous topic :: View next topic  
Author Message
forhire
Site Admin


Joined: 24 Jun 2004
Posts: 338
Location: Morton, Washington

PostPosted: Thu May 06, 2010 6:17 pm    Post subject: Converting images using imagemagic in DOS Reply with quote

Something it easier to do something as a batch. Normally I'd do this kind of stuff in bash... but today I was on a Windows machine so...

First I had a bunch of files with double extensions. Why do it by hand when a one liner will fix it right up:

for %f in (*.jpg.jpg) do ren %f %~nf

Next I re-sized them all using convert with this one liner. The '^>' is an escaped greater than telling convert to only fiddle with the larger images.

for %f in (*.jpg) do convert.exe -resize 400x400^> %f resized/%f
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Tiger Mountain Technologies Forum Index -> Open Source Software All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group