Thread

Posted on Fri Jan 5 22:37:12 2007 by oozy
List images that have a size less than 700 pixel in either width or height.
Is it possible to list only images that have its width or height less than 700 pixel?
Direct Responses: 3980 | Write a response
Posted on Sat Jan 6 01:21:12 2007 by exiftool in response to 3979
Re: List images that have a size less than 700 pixel in either width or height.
Sure. Try this:

exiftool -if "$imagesize and ($imagewidth<700 or $imageheight<700)" -q -t -S -filename -r DIR

where DIR is the name of the directory containing the images. The above command should work in a Windows shell, but if you are using a Unix or OS X shell, use single quotes instead of double quotes. around the -if expression.

- Phil
Direct Responses: 3983 | Write a response
Posted on Sat Jan 6 22:20:13 2007 by oozy in response to 3980
Re: List images that have a size less than 700 pixel in either width or height.
Somehow, I am getting an error. I will show the commands and the errors then I will list the images info extarcted by 'exiftool .'
exiftool -if '$imagewidth &lt; 600' . File not found: $imagewidth &lt; 600 ======== ./ksi-2131.jpg ======== ./ksi-2132.jpg ======== ./ksi-2134.jpg ======== ./ksi-2139.jpg 1 directories scanned 4 image files read
hmmm! I have images with witdh < 600. Why 'file not found'?
exiftool -if '$imagesize and ($imagewidth&lt;700 or $imageheight&lt;700)' -q -t -S -filename -r . File not found: $imagesize and ($imagewidth&lt;700 or $imageheight&lt;700) ksi-2131.jpg ksi-2132.jpg ksi-2134.jpg ksi-2139.jpg
why not?
======== ksi-2131.jpg ExifTool Version Number : 6.00 File Name : ksi-2131.jpg File Size : 128 kB File Modification Date/Time : 2007:01:06 22:08:56 File Type : JPEG MIME Type : image/jpeg JFIF Version : 1.1 Resolution Unit : inches X Resolution : 96 Y Resolution : 96 Image Width : 274 Image Height : 418 Image Size : 274x418 ======== ksi-2132.jpg ExifTool Version Number : 6.00 File Name : ksi-2132.jpg File Size : 92 kB File Modification Date/Time : 2007:01:06 22:16:58 File Type : JPEG MIME Type : image/jpeg JFIF Version : 1.1 Resolution Unit : None X Resolution : 1 Y Resolution : 1 Image Width : 936 Image Height : 700 Image Size : 936x700 ======== ksi-2134.jpg ExifTool Version Number : 6.00 File Name : ksi-2134.jpg File Size : 94 kB File Modification Date/Time : 2007:01:06 22:04:57 File Type : JPEG MIME Type : image/jpeg JFIF Version : 1.2 Resolution Unit : inches X Resolution : 300 Y Resolution : 300 Image Width : 600 Image Height : 480 Image Size : 600x480 ======== ksi-2139.jpg ExifTool Version Number : 6.00 File Name : ksi-2139.jpg File Size : 847 kB File Modification Date/Time : 2007:01:06 22:04:57 File Type : JPEG MIME Type : image/jpeg JFIF Version : 1.2 Resolution Unit : inches X Resolution : 300 Y Resolution : 300 Image Width : 1534 Image Height : 1350 Image Size : 1534x1350 4 image files read
Direct Responses: 3986 | Write a response
Posted on Sun Jan 7 14:37:34 2007 by exiftool in response to 3983
Re: List images that have a size less than 700 pixel in either width or height.
You need to be running a more recent version of ExifTool. The '-if' option was added in version 6.50. Try downloading the most recent version.

- Phil
Write a response