CCITTFaxFilter.reversed fix

pull/1/head
Yusuke Shinyama 2011-07-31 17:36:02 +10:00
parent dc8fde0e47
commit 24cd161fb7
1 changed files with 1 additions and 1 deletions

View File

@ -685,7 +685,7 @@ class CCITTFaxDecoder(CCITTG4Parser):
def output_line(self, y, bits):
bytes = array.array('B', [0]*((len(bits)+7)/8))
if self.reversed:
bits = [ not b for b in bits ]
bits = [ 1-b for b in bits ]
for (i,b) in enumerate(bits):
if b:
bytes[i/8] += (128,64,32,16,8,4,2,1)[i%8]