resized images to 400x300 max size, convert format to jpg.