Image Comparison With Bash Script
Hey guys, I'm writing a little script that automatically downloads images from a webpage source every day. The link to download them from is a php script, which works just fine with wget. I can download the images, automatically number and rename them and store them away in a directory. The problem is, the script keeps a number in a file in the image directory which tells it what number image is the next to be downloaded. So whenever a new image is downloaded, it knows what number to use in the php URL to get it. The problem is, once you get to the end of the list, when you use a number > number of images available, the php script just returns the last posted picture. Unfortunately, the script relies on not being able to find the downloaded file to know that it wasn't available.
Does anyone know of a way to compare two images on the command line (say, if their dimensions and size are the same, they're equal) or know of a better way to do this?
Last edited by smcallis; 06-29-2004 at 08:20 PM.
|