improved batch transforming images