Generalized output image size. Resized now works as expected.