def AddTextToImage(image, text):
  draw = ImageDraw.Draw(image)
  width, height = image.size
  lines = GetImageWrappedText(width, draw, text, FONT)
  text_width, text_height = draw.textsize('A', font=FONT)
  start_height_offset = max(10, text_height * len(lines))

  image = DrawBlurredRectangle(image,
                               [0, height-10,
                                width,
                                height-start_height_offset-10])

  # image is changed, re-set draw.
  draw = ImageDraw.Draw(image)

  for line in lines:
    text_width, text_height = draw.textsize(line, font=FONT)
    draw.text(((width-text_width)/2, height-start_height_offset-10), line,
              font=FONT,
              fill=settings.QUOTE_TEXT_COLOR)
    start_height_offset -= text_height
  return image
Return the text corresponding to the specified value.
dataset/ETHPy150Open GoogleCloudPlatform/solutions-orchestrator-android-sampleapp-smashpix/daemon/image_processing.py/AddTextToImage--crossover with--dataset/ETHPy150Open lsaffre/lino/lino/core/choicelists.py/ChoiceList.get_text_for_value