Logo Search packages:      
Sourcecode: ocrfeeder version File versions  Download package

def odf::opendocument::OpenDocument::addPicture (   self,
  filename 
)

Add a picture
    It uses the same convention as OOo, in that it saves the picture in
    the zipfile in the subdirectory 'Pictures'

Definition at line 175 of file opendocument.py.

00175                                   :
        """ Add a picture
            It uses the same convention as OOo, in that it saves the picture in
            the zipfile in the subdirectory 'Pictures'
        """
        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] = (filename, mediatype)
        return manifestfn

    def addThumbnail(self):


Generated by  Doxygen 1.6.0   Back to index