(image, colour=None)
return image
take image and make white areas transparent
    return transparent image
take image and make white areas transparent
    return transparent image
take image and make white areas transparent return transparent image
def make_transparent(image, colour=None):
    '''
    take image and make white areas transparent
    return transparent image
    '''
    image = image.convert("RGBA")
    datas = image.getdata()
    newData = []
    for item in datas:
        # white (ish)
        if item[0] >= 254 and item[1] >= 254 and item[2] >= 254:
            newData.append(transparent)
        else:
            if colour:
                newData.append(colour)
            else:
                newData.append(item)

    image.putdata(newData)
    return image
def make_transparent ( image , colour = None ) : image = image . convert ( "RGBA" ) datas = image . getdata ( ) newData = [ ] for item in datas : # white (ish) if item [ 0 ] >= 254 and item [ 1 ] >= 254 and item [ 2 ] >= 254 : newData . append ( transparent ) else : if colour : newData . append ( colour ) else : newData . append ( item ) image . putdata ( newData ) return image