Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ::by cale bradbury netgrind.net
- ::requires imagemagick to be installed
- ::call autogif.bat from the cmd line with the output name of the gif
- ::>autogif.bat gifname.gif
- @echo off
- cd %~dp0
- SET numColors=256
- :while1
- echo creating gif with %numColors% colors
- convert *.png -colors %numColors% %1
- SET /a gifFileSize=%~z1/1024/1024
- echo gif size %gifFileSize% MB
- if %~z1 gtr 2097152 (
- SET /a "numColors=%numColors%/2"
- if %numColors% gtr 8 (
- goto :while1
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement