Changeset 219 for pkpgcounter/trunk

Show
Ignore:
Timestamp:
07/02/05 11:43:02 (19 years ago)
Author:
jerome
Message:

Documented where the file format is documented

Files:
1 modified

Legend:

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

    r217 r219  
    3333    def getJobSize(self) : 
    3434        """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/ 
    3541        """ 
    3642        infileno = self.infile.fileno() 
     
    4753        pos = 4     
    4854        try :     
    49             nextifdoffset = unpack(integerbyteorder, minfile[pos:pos+4])[0] 
     55            nextifdoffset = unpack(integerbyteorder, minfile[pos : pos + 4])[0] 
    5056            while nextifdoffset : 
    51                 direntrycount = unpack(shortbyteorder, minfile[nextifdoffset:nextifdoffset+2])[0] 
     57                direntrycount = unpack(shortbyteorder, minfile[nextifdoffset : nextifdoffset + 2])[0] 
    5258                pos = nextifdoffset + 2 + (direntrycount * 12) 
    53                 nextifdoffset = unpack(integerbyteorder, minfile[pos:pos+4])[0] 
     59                nextifdoffset = unpack(integerbyteorder, minfile[pos : pos + 4])[0] 
    5460                pagecount += 1 
    5561        except IndexError :