Drunken Gifs

One should always be drunk. That’s all that matters…But with what? With wine, with poetry, or with virtue, as you chose. But get drunk.

― Charles Baudelaire

I find gifs intoxicating, not the looking at them but creating. This is ridiculous. I find sitting down to rip a gif out of a movie and crush it to as small as possible, or to script some sort of weird concoction a lot of fun.

This morning I read Alan’s post: Ooh Ooh Mr Kotter! I Know How To Optimize My GIFs!. It is great, a reminder than some of the fun of giffing is keeping the file size down.

Alan uses photoshop. I’ve never really got a grip of that application. I tend to use firefox, gifsicle or even javascript.

I though that I would se if I could replicate the sort of optimisation he writes about using gifsicle, for a wee bit of fun and learning. I’ve blogged about gifsicle a fair bit here. Gifsicle is a commandline application for working with gifs. It can be downloaded from Gifsicle: Command-Line Animated GIFs.

I stared by a sort of replication Alan’s use of GIPHY’s GIF Maker. I took:

and fed it through the giffy tool.

Like Alan I ended up with a huge gif 4.5MB worth.

So I downloaded it and got some info about it with gifsicle on the commandline:

john$ gifsicle -I drunk.gif
* drunk.gif 45 images
  logical screen 480x270
  global color table [256]
  background 2
  loop forever
  + image #0 480x270 transparent 2
    disposal asis delay 0.07s
  + image #1 480x270 transparent 2
    disposal asis delay 0.06s
  + image #2 480x270 transparent 2
    disposal asis delay 0.07s
  + image #3 480x270 transparent 2
    disposal asis delay 0.07s
  + image #4 480x270 transparent 2
    disposal asis delay 0.06s
  + image #5 480x270 transparent 2

There were a good few more lines, but I got the idea that there were 45 frames, each about 0.07 seconds long.

The plan was to reduce the colours, the number of frames and increase the length of frames to compensate.

The first thing I tried was:
gifsicle -U -O3 -d 28 --colors 128 drunk.gif `seq -f "#%g" 0 4 45` -o drunk-128.gif

What this does

-U: unoptimises the input gif

-O3: optimises the output

-d 28: set the delay to 28/100 sec

  • colors 128: cuts down the number of colours

seq -f "#%g" 0 4 45 is a clever bit:-) it produces a sequence of numbers with # in front between 0 & 45 in jumps of four. This causes gifsicle to use those frames of the original gif. We have reduced the number of frames and increased their length to keep the animation the same length.

This resulted in a 1.1MB file, not too good. I repeated the exercise with 64 colors, which got the gif down to 800kb


Not too bad but still a bit big. I then remembered there was a version of gifsicle that could do lossy production of gifs. Alan mentions using this in photoshop. I had downloaded this before but lot it. A qick google found this interesting post: Lossy Optimization for Animated GIFs – Rigor and lead to Lossy GIF compressor where I downloaded the modified version again.

I could now:

gifsicle -O3 --lossy=80 -U -d 28 --colors 128 drunk.gif `seq -f "#%g" 0 4 45` -o drunk-lossy-128.gif

Which give me, a 480k gif:

gifsicle -O3 --lossy=80 -U -d 28 --colors 64 drunk.gif `seq -f "#%g" 0 4 45` -o drunk-lossy-64.gif reduces the colours and weighs in at 391k (from the original 4.5MB).


I decided to push the lossyness a bit to:
gifsicle -O3 --lossy=160 -U -d 28 --colors 64 drunk.gif `seq -f "#%g" 0 4 45` -o drunk-lossy-160-colors-64.gif


This only shave the gif down to 325K so I think lossy=80 seems a good compromise.

This sort of gif fun might not be everyones drink, but if you are interested, I’ve some more scattered around this blog including: Taking Command of Gifs – 106 drop in and Gifsicle Comparison

Greenhorn Mistake

I’ve had a bit of difficulty getting time to watch any westerns. I decided to have a listen instead. I headed over to the Old Time Radio on Internet Archive and had a dig around, I spotted Gunsmoke – Single Episodes where there are 473 files.

I have heard of the show but knew nothing of it so I added the first episode to an RSS feed I am subscribe to in overcast and listen to it on my phone on the way to work.

As I listened I was quite surprised, this sounded familiar, sort of a bit noir 106. The hero showed a fair amount of cynicism, there were a couple of very negatively portrayed characters and most of the townsfolk were mob minded.

The hero was quick on the draw but noble in a Chandlerish way. He had a much worse temper than Marlow.

After listening I had to check Wikipedia

In the late 1940s, CBS chairman William S. Paley, a fan of the Philip Marlowe radio serial, asked his programming chief, Hubell Robinson, to develop a hardboiled Western series, a show about a “Philip Marlowe of the Old West”.

from: Gunsmoke – Wikipedia, the free encyclopedia.

So much for my insight. The whole Wikipedia article is quite interesting. I’ll probably listen to a few more on my commute.

The gif is from the trailer of Cowboy (Delmer Daves, 1958)

One of the more unorthodox westerns of the 1950s, Cowboy is also one of the best.

Seems like the stereotype of cowboy movies is a bit more complex than I though.

Gif Switchback

With 3 unsatisfactory draft post sittin’ in the chuck waggon. I am delighted to have to the opportunity to boil some coffee, sit back and shoot my mouth off. Or rather shoot this gif out from the hip:

Frame Delay 7/100 sec
Frame Delay7/100 sec
Frame Delay 14/100 sec
Frame Delay 14/100 sec
Frame Delay 20/100 sec
Frame Delay 20/100 sec
Frame Delay 28/100 sec
Frame Delay 28/100 sec

If I have to justify this in terms of DS106 I refer to a bit of char on Alan and Mariana’s radio show: A Bit of Rodeo Clowning on First High Noon Radio Show – DS106 Tricks where Alan talked about thinking about size, quality and the like in animated gifs and trying to make them look good and keep the size down. Then Sandy mentioned on G+ that this gif was a bit quick.

A couple of older experiments with gifs:
Gifsicle options
‎requiem colour pallets

And a post Why Gif? might be relevant.

Giffing the open range

Yesterday I read a great post on open which included this point:

Focusing on simple cost-benefit analysis models neglects the creative, fun and serendipitous aspects of openness and, ultimately, this is what keeps us learning.

The Cost of Freedom – The Open World | Open World

and noticed in Lorna’s twitter stream:

Which took me to: New York Public Library Invites a Deep Digital Dive – The New York Times

And on to:
Public Domain Collections: Free to Share & Reuse | The New York Public Library

where I searched:
Search results – “cowboy” – NYPL Digital Collections

And followed:

Cowboys on the range–an autumn beef roundup, Montana, U.S.A. – NYPL Digital Collections

Which linked to:

Step 2 CREATE : Stereogranimator

And so:

Using Freesound.org – “The Only Harmonica in The West” by IrishCinema and my Gifmovie plugin which Mariana’s post: Riding to Western 106 country reminded me of.

A little Fun and Serendipity on a rainy afternoon.

Laughing Cowboys


When I heard about #western106 I was looking forward to messing about as an outrider to the main herd, have a bit of fun, running the odd gif down and perhaps have a few campfire podcasts, nothing to heavy.

I’d not watched cowboy movies much recently and associate them with my father whom I watched them with and childhood. I was vaguely aware of some of the problems of the genre, but thought my favourites: Shane, High Noon, The Searchers and the like would protect me from heavy thinking.

Then Sandy’s Come to Jesus post 1 put paid to that. I might have to ponder the gun a bit.

Being a child in the sixties (b 1958) I didn’t notice any disapproval of guns growing up, they were common toys and we played lots of fighting games. World War 2 based in the main rather than cowboys.

As I got older I’ve not been a great action movie fan, but enjoyed a few movie fights without really thinking about it for too long. As gun toys became less popular and I worked as a primary teacher I tried to encourage my pupils to make something more constructive from lego than ray guns and developed a reasonably negative view of guns.

But the fascination is still there, in ds106 I’ve giffed a few eastern ones:

A Hitchcock gun


Only occasionally reacting to the unsavoury aspects:


I guess it is time to start thinking about how we can live in harmony 2

I didn’t blog this episode during the #prisoner106 run but it will fit in with #western106 too. I am not sure that just giving up the gun will do. The prisoner manage a fair bit of punching in that episode.

Of course it is not just guns, we will have the chance to get to grips with other ornery, politically incorrect aspects of the western over the next weeks. I am sure we can have fun along the trail, but keep a weather eye on the morals too.

1. “Come to Jesus” Talk – An earnest, straightforward confrontation, designed to correct some “sinful” behavior of either a human or an animal. Derived from the no-nonsense approach of 19th century frontier preachers, a “Come to Jesus” talk goes right to the heart of the matter with a sincere “straighten up or else” attitude. Free Cowboy Dictionary – Letter C – useful words of the cowboy lifestyle – definitions, terminology, slang, jargon, word origins

2. From the prisoner: Living in Harmony:

the goal of “Living in Harmony” and other padding episodes, was to “make them as visually exciting as possible but still retaining within them part of the theme of violence doesn’t pay off”

It was not shown as part of the first USA run of the series, worth reading the wikipedia article