Changeset 372 for pkpgcounter/trunk/pkpgpdls/tiff.py
- Timestamp:
- 08/26/06 23:53:35 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pkpgpdls/tiff.py
r365 r372 33 33 class Parser(pdlparser.PDLParser) : 34 34 """A parser for TIFF documents.""" 35 totiffcommand = "cat >%(fname)s" 35 36 def isValid(self) : 36 37 """Returns 1 if data is TIFF, else 0.""" … … 78 79 return pagecount 79 80 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 files85 # 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 break91 out.write(data)92 out.close()93 94 81 def test() : 95 82 """Test function."""