'**SUMMARY**
Return all of the pixels on an arbitrary line.
**PARAMETERS**
* *pt1* - The first pixel coordinate as an (x,y) tuple or list.
* *pt2* - The second pixel coordinate as an (x,y) tuple or list.
**RETURNS**
Returns a list of RGB pixels values.
**EXAMPLE**
>>>> img = Image(\'something.png\')
>>>> img.getPixelsOnLine( (0,0), (img.width/2,img.height/2) )'

def getPixelsOnLine(self, pt1, pt2):

    retVal = None
    if ((isinstance(pt1, tuple) or isinstance(pt1, list)) and (isinstance(pt2, tuple) or isinstance(pt2, list)) and (len(pt1) == 2) and (len(pt2) == 2)):
        pts = self.bresenham_line(pt1, pt2)
        retVal = [self.getPixel(p[0], p[1]) for p in pts]
    else:
        warnings.warn('ImageClass.getPixelsOnLine    -    The    line    you    provided    is    not    valid')
    return retVal
