Source: http://eecs.csuohio.edu/~sschung/CIS408/Lecture_Wangch12a-move-image_2.pdf