Fun with the command line
Terezi doodling things with chalk on LOTAF!
Iām not so sure if I like how this turned out hmm. Fullview here!
So, if you scale a delta-compressed GIF file using imagemagick, it looks lousy. This is because a delta frame is going to contain lots of single-pixel data, which won’t survive cubic scaling. (I assume Tumblr uses imagemagick, the standard Linux suite of command-line image manipulation tools)
This can easily be observed in the wild:
$ wget https://s3.amazonaws.com/data.tumblr.com/tumblr_lwoh2iFRAA1r18yoxo1_1280.gif --2011-12-23 15:05:30-- https://s3.amazonaws.com/data.tumblr.com/tumblr_lwoh2iFRAA1r18yoxo1_1280.gif Resolving s3.amazonaws.com... 207.171.185.200 Connecting to s3.amazonaws.com|207.171.185.200|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 173368 (169K) [image/gif] Saving to: `tumblr_lwoh2iFRAA1r18yoxo1_1280.gif' 100%[=============================================================================================================>] 173,368 177K/s in 1.0s 2011-12-23 15:05:31 (177 KB/s) - `tumblr_lwoh2iFRAA1r18yoxo1_1280.gif' saved [173368/173368] $ convert -geometry 500 tumblr_lwoh2iFRAA1r18yoxo1_1280.gif foobar.gif $ display foobar.gif
Ideally, we’d just tell imagemagick to convert it to an uncompressed form, scale it, then run a new delta-compression pass. There’s probably a cheap, easy way to do that, but five minutes of googling didn’t find one. So I made an ugly hack:
$ convert -geometry 500 'tumblr_lwoh2iFRAA1r18yoxo1_1280.gif[0-9]' images.mng $ convert -layers optimize images.mng foobar.gif
MNG is the animated version of PNG. [0-9] tells imagemagick to pull frames 0 through 9, -geometry 500 tells it to scale the longest dimension to 500 pixels, then it writes the composite set of layers to disk. Then we convert the MNG file back to GIF, using -layers optimize to delta-compress it. (Foobar is a standard hacker metasyntactic variable)
Here’s the result:

-
sirwallacewells liked this
-
ryandoesstuff liked this
-
treacheriesarchitect liked this
-
thenewgear reblogged this from fuckyeahmspagifs
-
xraincolors liked this
-
l3monsnout1sgu1lty reblogged this from roselalonde
-
roselalonde reblogged this from fuckyeahmspagifs
-
alpacacrossing liked this
-
frostycatmonstur liked this
-
hyperactivereaper liked this
-
kurosso liked this
-
bucketfulofrainbows liked this
-
thattrollwiththehorns reblogged this from vrisglare
-
thattrollwiththehorns liked this
-
strange-aloner liked this
-
lolikonnichiwa reblogged this from majyyk
-
mirrordivis liked this
-
miraculoustang liked this
-
zomgenius liked this
-
majyyk reblogged this from beepony
-
smugleaf42 liked this
-
smugleaf42 reblogged this from gumiira
-
spinalism reblogged this from fuckyeahmspagifs
-
synco liked this
-
beepony liked this
-
beepony reblogged this from fuckyeahmspagifs
-
thelof9 liked this
-
bunnyfan194 reblogged this from fuckyeahmspagifs
-
trollmegle-my-eggo reblogged this from fuckyeahmspagifs
-
askthetouhous liked this
-
m0mentomori liked this
-
rockerfox999 liked this
-
splicerthedicer liked this
-
shaylerz reblogged this from fuckyeahmspagifs
-
2xknifekind liked this
-
2xknifekind reblogged this from vrisglare
-
hypothermiclegumes liked this
-
shimurs reblogged this from fuckyeahmspagifs
-
ixthil liked this
-
hdp-goes-honk liked this
-
happuhappu liked this
-
happuhappu reblogged this from fuckyeahmspagifs
-
hdp-goes-honk reblogged this from fuckyeahmspagifs
-
temporallyronin liked this
-
jacquerel liked this
-
xaien liked this
-
rainbrocrash liked this
-
vvooper reblogged this from fuckyeahmspagifs
-
imdabes reblogged this from fuckyeahmspagifs
-
vrisglare reblogged this from fuckyeahmspagifs
- Show more notes