'Test if line contains pixels of exactly the same color'

@classmethod
def test_line(cls, img, y):

    start = img.pixel(0, y)
    for i in range(1, img.width()):
        if (img.pixel(i, y) != start):
            return False
    return True
