title: Image downscaling algorithm
body: <p>Could you help me find the right algorithm for image resizing? I have an image of a number. The maximum size is 200x200, I need to get an image with size 15x15 or even less. The image is monochrome (black and white) and the result should be the same. That's the info about my task.</p>
  
  <p>I've already tried one algorithm, here it is</p>
  
  <pre><code>// xscale, yscale - decrease/increase rate
  for (int f = 0; f&lt;=49; f++)
              {
                      for (int g = 0; g&lt;=49; g++)//49+1 - final size
                      {
                              xpos = (int)f * xscale;
                              ypos = (int)g * yscale;
                              picture3[f][g]=picture4[xpos][ypos];
                      }
              }
  </code></pre>
  
  <p>But it won't work with the decrease of an image, which is my prior target.
  Could you help me find an algorithm, which could solve that problem (quality mustn't be perfect, the speed doesn't even matter). Some information about it would be perfect too considering the fact I'm a newbie. Of course, a short piece of c/c++ code (or a library) will be perfect too.</p>
  
  <p>Edit:
  I've found an algorithm. Will it be suitable for compressing from 200 to 20?</p>