Correct image size computation