repaired resizing when one side of an image is less then resizing values.