title: Resizing image in specific case
body: <p>I have an image of size <code>260 x 260</code> pixels. I know how to resize it to <code>140 x 140</code> pixels for example and then convert it to grayscale. Let us assume the matlab code below: </p>
  
  <pre><code>image = imread('my_image.jpg');
  image_resized = imresize(image, [140 140]);
  size(image_resized) % 140 x 140 x 3
  image_gray = rgb2gray(image_resized);
  size(image_gray) % 140 x 140
  </code></pre>
  
  <p>What I want is a specific case. I am interested to normalize the image to <strong>140 pixels in height</strong> where <strong>width was rescaled accordingly so that the image aspect ratio was preserved</strong>. Unfortunately I don't know how to edit my above code.</p>
  
  <p>Any help will be very appreciated.</p>