21 uint32_t *Input,
int InputWidth,
int InputHeight,
22 float ScaleFactor,
int CenteredGrid)
24 const float Start = (CenteredGrid) ? (1/ScaleFactor - 1)/2 : 0;
28 for(y = 0; y < OutputHeight; y++, Output += OutputWidth)
30 iy = (int)floor(Start + y/ScaleFactor + 0.5);
34 else if(iy >= InputHeight)
37 for(x = 0; x < OutputWidth; x++)
39 ix = (int)floor(Start + x/ScaleFactor + 0.5);
43 else if(ix >= InputWidth)
46 Output[x] = Input[ix + InputWidth*iy];