Swap the BMP rows read from stdout.