I'll save you some googling time. This reference is very cool, check it out:

http://www.efg2.com/Lab/ImageProcessing/Scanline.htm