Page 1 of 1

How to reduce gif size in batch process

Posted: 2017-10-29T04:16:47-07:00
by agriz

Code: Select all

convert raw/1.gif -fuzz 10% -layers Optimize processed/1.gif
This command reduces the gif size.
But how can i do batch process?
Right now, i have to do one by one in command promt

Thanks

Re: How to reduce gif size in batch process

Posted: 2017-10-29T05:30:02-07:00
by snibgo
Put it in a shell loop.

Re: How to reduce gif size in batch process

Posted: 2017-10-29T06:36:10-07:00
by agriz
Images name are different. They are not just 1.gif 2.gif

Re: How to reduce gif size in batch process

Posted: 2017-10-29T07:12:22-07:00
by snibgo
So? You can loop through all the files in a directory. Or all the files named "*.gif" or "?.gif" or whatever you want.

Re: How to reduce gif size in batch process

Posted: 2017-10-30T21:55:23-07:00
by agriz

Code: Select all

mogrify -fuzz 10% -layers Optimize raw/*.gif  processed/*.gif
This one works. But makes changes in raw folder itself
I dont know what to loop

Re: How to reduce gif size in batch process

Posted: 2017-10-31T09:09:11-07:00
by fmw42
You can use the -path option in mogrify to send the files to another (empty if desired) folder, which must exist already. See http://www.imagemagick.org/Usage/basics/#mogrify

Re: How to reduce gif size in batch process

Posted: 2017-10-31T23:41:06-07:00
by agriz
fmw42 wrote: 2017-10-31T09:09:11-07:00 You can use the -path option in mogrify to send the files to another (empty if desired) folder, which must exist already. See http://www.imagemagick.org/Usage/basics/#mogrify
Thank you so much! It works now as i expected