All pastes #83594 Raw Edit

Mine

public c v1 · immutable
·published 2006-07-09 22:31 UTC
rendered paste body
for (j = 0; j < height; j++) for (i = 0; i < width; i++) for (p = 0; p < bytesPerPixel; p++) bufferOutputFlipped[((height-j-1)*width*bytesPerPixel+i*bytesPerPixel+p)] = buffer[(j*width*bytesPerPixel+i*bytesPerPixel+p)];for (j = 0; j < height; j++) for (i = 0; i < width; i++) for (p = 0; p < bytesPerPixel; p++) memcpy( bufferOutputFlipped[((height-j-1)*width*bytesPerPixel,     bytesPerPixel*width,+i*bytesPerPixel+p)] = buffer[(j*width*bytesPerPixel+i*bytesPerPixel+p)];