Editing Movie Posters From Emacs

I was waiting for some people to drop by yesterday to pick up a sofa, and I started thinking about how nice it would be to pull down movie posters automatically and perhaps put some text or border or something on them.

Instead of sensibly looking for an API for this kind of stuff, I wondered whether I could just quickly alter the imbd.el library, since it already had some imdb parsing functionality, and I have all films tagged with imdb IDs.

The short answer is “no, that can’t be done without insane hacks”, and the longer answer is, “I did it anyway”.

The imdb website uses a Javascript thing to display a “carousel” of images, and parsing Javascript with regexps and stuff isn’t something that can be recommended.

But it works right now, and will probably break when imdb does the smallest possible change to their code, but hey, whatevs.

To alter the images (as an example, I’ve added that red border with the wrong date up there). I wrote a teensy little library that just creates an SVG image, plonks the poster JPG into the SVG and then adds the border and text.  Composing images like this via SVG in Emacs is incredibly easy, especially since you can “live edit” the images by altering the SVG programmatically.

And then the couch people finally arrived.

Leave a Reply