A filter which shifts circularly a image by one pixel up and left:

r

src((x+1)%X,(y+1)%Y,0)

g

src((x+1)%X,(y+1)%Y,1)

b

src((x+1)%X,(y+1)%Y,2)

 

The modulo (%) operator cycles the shift around the image.