SIPS: Only Resize if Image is 315x300? I'm currently using sips --resampleHeightWidth 250 300 "S1" to resize new images in a folder but I think that it might be resizing images that were already resized.. Is there anyway to know this for sure?  If not what do I add so I can only resize images taht are 315x300?
Here is a bash script to check the size before : 

#!/bin/bash

#theFile given in input   
theFile=$1          

#using sips to retrieve the width &amp; height            
size=($(sips -g pixelWidth -g pixelHeight theFile | grep -o '[0-9]*$'))                      

#the size you want
width=315                                                                                       
height=300

if [[ ${size[0]} -eq $width &amp;&amp; ${size[1]} -eq $height ]]; then                                    
    #put here your command for files that are 315*300                                                         
fi