modifying images to the correct size