Show
Ignore:
Timestamp:
08/16/06 16:30:20 (18 years ago)
Author:
jerome
Message:

Added PRELIMINARY support for ink coverage with the TIFF format.
IMPORTANT : dpi is ignored, and TIFF files that can't be opened with PIL
can't be used.

Files:
1 modified

Legend:

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

    r354 r365  
    7878        return pagecount 
    7979         
     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         
    8094def test() :         
    8195    """Test function."""