Fixed error in automatic image cropping

Misplaced Row/Column Index variables