resize to fit painting