Rich Lafferty's LiveJournal (mendel) wrote,
Rich Lafferty's LiveJournal

  • Mood:

Automatic Threadless wallpaper generator

I realized while browsing through Threadless's catalog the other day that while there are only a handful of designs there that I'd like to wear, pretty much all of them with suitable background colors would make great computer wallpaper. But since there were hundreds I liked, I didn't want to have to edit all of them to the right size and layout by hand.

A bit of futzing around with Image::Magick later, and we have threadpaper, a little Perl program which takes a Threadless URL and gives you wallpaper.
   Usage: ./threadpaper [options] [threadless-url]

        --width WIDTH    width of wallpaper (default: 1600)
        --height HEIGHT  height of wallpaper (default: 1200)
        --center         center image instead of lower corner
        --logo           include color-matched Threadless logo
        --scale PERCENT  scale image by PERCENT
        --file FILENAME  output filename
                              (default: /tmp/wallpaper.png)

The --logo option is admittedly a bit silly, but when I realized I could guess which color to use for the logo based on the predominant colors in the image I wanted to give it a try. You can grab the logo file it uses here though.

I've got some examples up there too.

For extra fun, just call threadpaper with a threadless URL with a random product number between one and 376 when you login and use the result as your wallpaper for that session. Endless surprises!

  • New Year's resolution

    I'm going to post this on my zen blog later this week, but right now I want to post it somewhere and I'm too tired to compose a post over…

  • how's this work again

    So uh hi there everyone, long time no see? So I've got this theory where I think it'd be good for me to just write about stuff that's going on here,…

  • o hai lj.

    I should totally start using this again.

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded