def GetRgb(rawFolder, filename):
    """
    Resizes the image down to one pixel in size, then returns a tuple of the 
    RGB values of that pixel. Gives an average RGB value for our image. Might
    be good for something one day.
    ---------------------------------------------------------------------------------------------
    Inputs:
    rawFolder:    Folder where our raw imported files are
    filename:     Image we are processing
    ---------------------------------------------------------------------------------------------
    """
    try:
        i=Image.open(os.path.join(rawFolder, filename))
        rgb = i.quantize(1).convert('RGB').getpixel((0, 0))    
        return rgb
    except:
        tb = sys.exc_info()[2]
        tbinfo = traceback.format_tb(tb)[0]
        pymsg = "PYTHON ERRORS:\nTraceback Info:\n" + tbinfo + "\nError Info:\n    " + \
                str(sys.exc_type)+ ": " + str(sys.exc_value) + "\n"

    Resizes the image down to one pixel in size, then returns a tuple of the 
    RGB values of that pixel. Gives an average RGB value for our image. Might
    be good for something one day.
    ---------------------------------------------------------------------------------------------
    Inputs:
    rawFolder:    Folder where our raw imported files are
    filename:     Image we are processing
    ---------------------------------------------------------------------------------------------
    
recipes/Python/500266_Cataloging_adding_IPTC_keywords_digital/recipe-500266.py