'Add a picture
It uses the same convention as OOo, in that it saves the picture in
the zipfile in the subdirectory \'Pictures\'
If passed a file ptr, mediatype must be set'

def addPicture(self, filename, mediatype=None, content=None):

    if (content is None):
        if (mediatype is None):
            (mediatype, encoding) = mimetypes.guess_type(filename)
        if (mediatype is None):
            mediatype = ''
            try:
                ext = filename[filename.rindex('.'):]
            except:
                ext = ''
        else:
            ext = mimetypes.guess_extension(mediatype)
        manifestfn = ('Pictures/%0.0f%s' % ((time.time() * 10000000000), ext))
        self.Pictures[manifestfn] = (IS_FILENAME, filename, mediatype)
    else:
        manifestfn = filename
        self.Pictures[manifestfn] = (IS_IMAGE, content, mediatype)
    return manifestfn
