'Add a picture
It uses the same convention as OOo, in that it saves the picture in
the zipfile in the subdirectory \'Pictures\'.
If mediatype is not given, it will be guessed from the filename
extension.'

def addPictureFromFile(self, filename, mediatype=None):

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