ImageMagick trick for new userpic

So I spent about 30 mins this morning futzing with ImageMagick convert and a huge animated gif someone posted in IRC. (Original behind the cut.)

The result is my new userpic and I love it.

Here’s how I did it. First, extract the frames from the gif.

convert "data.gif" "data\data.png"

Delete a bunch of unnecessary frames, named data_x.png to -xxx.png. Fix the remaning numbered frames by left-padding with zeros.

convert -delay 20 -loop 0 data\data*.png -colors 8 -resize 100x100 data_small.gif

Tada! Down from 1.58Mb to 33.7Kb.

Advertisements
This entry was posted in computers, video. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s