Package flumotion :: Package component :: Package converters :: Package overlay :: Module genimg
[hide private]

Module genimg

source code


Version: $Rev$

Functions [hide private]
3 sized tuple of string and 2 booleans
generateOverlay(text, font, showFlumotion, showCC, showXiph, width, height)
Generate an transparent image with text + logotypes rendered on top of it suitable for mixing into a video stream
source code
Variables [hide private]
  FONT = 'sans'
  FONT_PROPS = 'normal 22'
  TEXT_XOFFSET = 6
  TEXT_YOFFSET = 6
  BORDER = 4
  FONT_SIZE = 22528
  __package__ = 'flumotion.component.converters.overlay'
Function Details [hide private]

generateOverlay(text, font, showFlumotion, showCC, showXiph, width, height)

source code 

Generate an transparent image with text + logotypes rendered on top of it suitable for mixing into a video stream

Parameters:
  • text (str) - text to put in the top left corner
  • font - font description used to render the text
  • showFlumotion (bool) - if we should show the flumotion logo
  • showCC (bool) - if we should show the Creative Common logo
  • showXiph (bool) - if we should show the xiph logo
  • width (int) - width of the image to generate
  • height (int) - height of the image to generate
Returns: 3 sized tuple of string and 2 booleans
raw image and if images or if text overflowed