extracted ImageRow logic