def _centered_text_position(img, num_lines, line_height):

    """ Center text in the middle of the image depending on how many lines the text is """

    x_position =  15

    textbox_center = num_lines*line_height/2
    image_center = img.height/2 
    y_position = image_center - textbox_center

    return (x_position, y_position)