Fitting the images