Figure 2 Rothstein code for a line of slope 5/9. Each time the line crosses a horizontal grid line the code for the current column is set to one. When used to expand an image horizontally, the x-axis represents the new width and the y-axis the old width (in this case, a 9/5 expansion). Each column in the target image with a zero code is a duplicate of the preceding column that has a one. Note the Rothstein code contains as many set bits as the number of columns in the original image. In this case, it describes how to evenly distribute the five original columns among the nine columns of the destination image.