def zope_txt2img(self, id, label, imgformat="PNG", **kw):
    """
    Copy this module to your Zope Instance Extensions directory,
    and after restarting Zope do create an External Method in ZMI
    following the example:

     Id - txt2img 
     Title - Convert text into image
     Module Name - txt2img.py
     Function Name - zope_txt2img

    """
    from OFS.Image import manage_addImage	
    imgfile = StringIO()
    img = txt2img(label, **kw)
    img.save(imgfile, imgformat)	
    manage_addImage(self, id, imgfile)

    Copy this module to your Zope Instance Extensions directory,
    and after restarting Zope do create an External Method in ZMI
    following the example:

     Id - txt2img 
     Title - Convert text into image
     Module Name - txt2img.py
     Function Name - zope_txt2img

    
recipes/Python/483756_Dynamic_Generatiimage/recipe-483756.py