add filter to perform a relative resize, thus keeping the aspect ratio, and not exceeding a max width and a max height