[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: using convert to batch convert

Quoting "Christopher S. Swingley" <cswingle@iarc.uaf.edu>:
> > The command I would expect to work:
> > 
> > convert -sample 50% *
> Another method that I often use is:
>     $ find ./ -name '*.gif' -exec convert -geometry 50% {} {}.png \;
> The {}'s are replaced by the filenames that 'find' found, one at a time.
> So this command would reduce the size of all GIF images in the current
> (and all sub-) directories, as well as convert them to PNG files.

Correction to the above:
Don't use -geometry to change the scale, use -sample as orginal poster said!

find ./ -name '*.gif' -exec convert -sample 50% {} {}.png \;

Otherwise it complains that it can't find the files! Took me a little while to 
work out why it was overwriting my files with a 0 byte file :) That teach me to  
RTFM - thank god for backups.

Whether you think you can,
Or whether you think you can't,
You're right.

Reply to: