Thursday, July 17, 2008

Random Dinosaur Comic Generator

So, I just got finished downloading every dinosaur comic and vaguely remembered something about a random Garfield generator (and looking for that I refound this, which is pure hilarity), and some idea about applying that to dinosaur comics. And the more I thought about it, the more I realized how feasible it was: you'd just have to cut up every one using ImageMagick and randomly put them together.

This is a modified version of the script I used (without the for loops and my directories):

qj@ubuntu:~$ cat cutup
#!/bin/bash
comicnumber=$1
convert -crop 244x243+0+0 "http://www.qwantz.com/comics/comic2-"$comicnumber".png" $comicnumber"_1.png"
convert -crop 130x243+244+0 "http://www.qwantz.com/comics/comic2-"$comicnumber".png" $comicnumber"_2.png"
convert -crop 361x243+374+0 "http://www.qwantz.com/comics/comic2-"$comicnumber".png" $comicnumber"_3.png"
convert -crop 195x257+0+243 "http://www.qwantz.com/comics/comic2-"$comicnumber".png" $comicnumber"_4.png"
convert -crop 298x257+195+243 "http://www.qwantz.com/comics/comic2-"$comicnumber".png" $comicnumber"_5.png"
convert -crop 242x257+493+243 "http://www.qwantz.com/comics/comic2-"$comicnumber".png" $comicnumber"_6.png"
You can then cut up any dinosaur comic by running ./cutup, with the first argument being the comic number, like 02, or 1290.

Then I made a simple, but long script to select 1 frame from 6 random comics, and generate an html page with all the frames together and linking back to their original comics. Example (Ugly-ly shrunken) below:


And a better screenshot for good measure:


Then, as the final step to all of this, I checked to see if anyone had done this before. :)
-QJ

Update: hdh has informed me of a three frame randomizer, and I must admit: I like it. Here's an great one that I got on my first try.

2 comments:

hdh said...

In the TaBB thread, Ryan North made a randomizer with just panels 1, 2 and 6, which I find much more intelligible than the 6-panel roulette and the Garfield randomizer packed together. http://www.qwantz.com/random.html

Quicksilver_Johny said...

Thanks for the tip. This one's great, especially when T-Rex is thinking only he exists.
Post Updated.