shrinking background image to fit parameters