imagemagickのconvertとidentifyでできる
適当にスクリプト書けばいい