title: Rescaling an image with libvips
body: <p>I have an image which is <code>6130x5548 pixels</code> and I want to rescale it so that the longest side is <code>32768 pixels</code> (and then do a pyramid of tiles with 7 zoom levels). I undestand <code>vips resize</code> is the obvious way for something like that, hence I tried the line below   </p>
  
  <pre><code>vips resize image_in.tif img_rescaled.tif 5.345513866231648
  </code></pre>
  
  <p>The number <code>5.34551</code> is just the ratio <code>32768/6130</code>, the scale factor along my <code>x axis</code>. If I want to specify the exact dimensions in pixels of the retured image how can I do that please?</p>
  
  <p>I tried to use <code>vips thumbnail</code> for this purpose, I dont know if this is recommended or not but it does work. </p>
  
  <pre><code>vips thumbnail image_in.tif img_rescaled.tif 32768
  </code></pre>
  
  <p>Is something like that ok please? </p>
  
  <p>Also the two approaches give quite different outputs in terms of MB size. While <code>vips thumbnail</code> produces a <code>tif</code> with size <code>2.8Gb</code> the <code>vips resize</code> call returns a <code>tif</code> with size <code>1.8Gb</code>. </p>
  
  <p>Both images have (obviously) the same dimensions <code>32768x29657 pixels</code>, same resolution <code>72dpi</code> but different <code>bit depth</code> The <code>tif</code> from  <code>vips thumbnail</code> has <code>24 bit depth</code> whereas the one from <code>vips resize</code> <code>16 bit depth</code>. The original image has <code>bit depth=16</code>.</p>
  
  <p>Also, I understand that the algorithm used by <code>vips translate</code> plays a significant role to the resulting file size. Can I set the algorithm when I use <code>vips thumbnail</code> and/or the <code>bit depth</code> please?</p>