Changeset 219 for pkpgcounter/trunk/pdlanalyzer/tiff.py
- Timestamp:
- 07/02/05 11:43:02 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pkpgcounter/trunk/pdlanalyzer/tiff.py
r217 r219 33 33 def getJobSize(self) : 34 34 """Counts pages in a TIFF document. 35 36 Algorithm by Jerome Alet. 37 38 The documentation used for this was : 39 40 http://www.ee.cooper.edu/courses/course_pages/past_courses/EE458/TIFF/ 35 41 """ 36 42 infileno = self.infile.fileno() … … 47 53 pos = 4 48 54 try : 49 nextifdoffset = unpack(integerbyteorder, minfile[pos :pos+4])[0]55 nextifdoffset = unpack(integerbyteorder, minfile[pos : pos + 4])[0] 50 56 while nextifdoffset : 51 direntrycount = unpack(shortbyteorder, minfile[nextifdoffset :nextifdoffset+2])[0]57 direntrycount = unpack(shortbyteorder, minfile[nextifdoffset : nextifdoffset + 2])[0] 52 58 pos = nextifdoffset + 2 + (direntrycount * 12) 53 nextifdoffset = unpack(integerbyteorder, minfile[pos :pos+4])[0]59 nextifdoffset = unpack(integerbyteorder, minfile[pos : pos + 4])[0] 54 60 pagecount += 1 55 61 except IndexError :