All pastes #83627 Raw Edit

Someone

public c v1 · immutable
·published 2006-07-09 23:00 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),     buffer+(j*width*bytesPerPixel)    bytesPerPixel*width);for (j = 0; j < height; j++)			memcpy( bufferOutputFlipped+((height-j-1)*width*bytesPerPixel), 			    buffer+(j*width*bytesPerPixel),			    bytesPerPixel*width);for (j = 0; j < height; j++)			fwrite( bufferOutputFlipped+((height-j-1)*width*bytesPerPixel), bytesPerPixel*width, 1, stdout );