Show
Ignore:
Timestamp:
08/26/06 23:53:35 (18 years ago)
Author:
jerome
Message:

Now uses the standard mechanism for the TIFF conversion, even if none has to occur for this particular file format.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pkpgcounter/trunk/pkpgpdls/tiff.py

    r365 r372  
    3333class Parser(pdlparser.PDLParser) : 
    3434    """A parser for TIFF documents.""" 
     35    totiffcommand = "cat >%(fname)s" 
    3536    def isValid(self) :         
    3637        """Returns 1 if data is TIFF, else 0.""" 
     
    7879        return pagecount 
    7980         
    80     def convertToTiffMultiPage24NC(self, fname, dpi) : 
    81         """Converts the input file to TIFF format, X dpi, 24 bits per pixel, uncompressed. 
    82            Writes TIFF datas to the outputfile file object. 
    83         """    
    84         # TODO : There's NO conversion done, so dpi is ignored, and TIFF files 
    85         # TODO : that can't be opened with PIL can't be used... 
    86         out = open(fname, "wb") 
    87         while 1 : 
    88             data = self.infile.read(pdlparser.MEGABYTE) 
    89             if not data : 
    90                 break 
    91             out.write(data) 
    92         out.close()     
    93          
    9481def test() :         
    9582    """Test function."""