---
author: einar
categories:
- General
- Linux
comments: true
date: "2006-12-23T10:42:21Z"
slug: wallpaper-size-checker
title: Wallpaper size checker
disable_share: true
wordpress_id: 141
---

**UPDATE**: Some stupid bugs had crept in the code, so I updated the archives. Sorry for the inconvenience.

I've writtern a small Python script to find wallpapers with right size or aspect ratio I needed, and now I'm releasing it to the public. It may come in handy especially when you download lots of desktop wallpapers (archives, torrents) and you don't know which ones are suited for your monitor.

<!--more-->

You can download the script in [tar.gz format]({{ site.url }}/files/wp_filter.tar.gz) or [zip format]({{ site.url }}/files/wp_filter.zip). It requires Python (obviously) and the [Python Imaging Library](http://www.pythonware.com/products/pil/) (PIL). Linux users can install them using their package manager of choice, while Windows users can download the [Python installer](http://www.python.org/download/windows/) from python org, and the [corresponding installer](http://www.pythonware.com/products/pil/#pil116) for the PIL (make sure that you download a version that matches your Python version).

You need to run this program from the command line. Use -h or --help as a switch to see a list of the options. Call it with the name of the directory you want to scan and the name of a report file. If you don't specify any options, it will just produce a file with all the images it has found, complete with sizes. Otherwise you can filter for height and width (e.g. only 1280x800) or by aspect ratio (e.g. only widescreen).

Report bugs and suggestions here. The code is released under GNU GPL v2 only (not "any later version").
