Q.1
The strategy used here to change the picture left to right, rather than top to bottom is:
Index the pixels with a negative increment
Use two loops, increasing X in the outer loop, and increasing Y in the inner loop
Using the flip operation on the pixels
Mirroring the pixels first