function I=image_resize(filename,S)
%This functions loads the image in the filename and resizes its biggest
%dimension to the size given in S, using the bilinear method.

I=imread(filename);
[imx,imy,imz]=size(I);
if imx>imy
    I=imresize(I,S/imx,'bilinear');
else
    I=imresize(I,S/imy,'bilinear');
end
