#!/usr/bin/perl

# requires identify from imagemagick

# if no arg, exit
exit 1 if scalar(@ARGV) != 1;

# get resolution of the image
($resw, $resh) = split /x/, (split / /, `identify $ARGV[0]`)[2];

# grep against standard horizontal pixel dimensions
$times = grep /^$resw$/, (1024, 1280, 1440, 1600, 1680, 1920, 2560);

# if we had a grep match, move it and exit
if ($times > 0)
{
    `mv $ARGV[0] ~/media/bgs`;
    exit 0;
}

# could not deal with it, let fsniper know to pass it in
exit 1;

