resize images in batch, preserving the three structure