matthiasm@8: function img = imresizeAspect(img, maxSize) matthiasm@8: % function img = imresizeAspect(img, maxSize) matthiasm@8: % If image is larger than max size, reduce size, preserving aspect ratio of input. matthiasm@8: % matthiasm@8: % If size(input) = [y x] and maxSize = [yy xx], matthiasm@8: % then size(output) is given by the following (where a=y/x) matthiasm@8: % if y