Scales an image to the desired dimensions with a
   filter.