Downscaling by skipping rows and columns – any example images?
A basic nearest neighbour scale function would work like so. Here I also use 24:8 fixed point arithmetic to make it more micro friendly. 

const int originalWidth = 320, originalHeight = 240;
int targetWidth = 50, targetHeight = 50;

char *pSource = sourceBuffer; 
char *pDest = destBuffer;    // you can use RGB instead of char

int yStep = (originalWidth &lt;&lt; 8) / targetWidth;
int xStep = (originalHeight &lt;&lt; 8) / targetHeight;

for(int y = 0, sampleY = 0; y &lt; targetHeight; y++, sampleY += yStep) {
    // Point to start of scaled Y source line
    char *pSourceLine = pSource + ((sampleY &gt;&gt; 8) * originalWidth);

    // Output the line, scaling only in X (we already know scaled-Y)
    for(int x = 0, sampleX = 0; x &lt; targetWidth; x++, sampleX += xStep)
        *pDest++ = pSourceLine[sampleX &gt;&gt; 8];
}


This will also work to scale image up as well as down, it should work on any input vs output size.