Commits

Christian Tismer committed b06d22a

intermediate. Some multipage.tiff file from Christian Heimes works only partially. Something is still wrong. Checking in to work from my home machine - the laptop has a broken pad.

Comments (0)

Files changed (2)

tiffany/monkeypil.py

     outfile = os.path.join(os.path.dirname(imfile), 'look_' + fname)
     im = open(imfile)
 
-    with io.open(outfile, 'wb') as imf:
-        for i in range(2):
-            im.seek(altpage)
-            im.save(imf)
-            im.seek(0)
-            im.save(imf)
+    #with io.open(outfile, 'wb') as imf:
+        #for i in range(2):
+            #im.seek(altpage)
+            #im.save(imf)
+            #im.seek(0)
+            #im.save(imf)
 
-    # reading from a buffer
-    im = io.open(imfile, 'rb').read()
-    im = io.BytesIO(im)
-    im = open(im)
+    ## reading from a buffer
+    #im = io.open(imfile, 'rb').read()
+    #im = io.BytesIO(im)
+    #im = open(im)
 
     with io.open(outfile, 'wb') as imf:
-        for i in range(2):
-            im.seek(altpage)
-            im.save(imf)
-            im.seek(0)
-            im.save(imf)
+        for i in range(5):
+            page = altpage
+            while page >= 0:
+                im.seek(page)
+                im.save(imf)
+                page -= 1
+            page = 0
+            while 0 and page <= altpage:
+                im.seek(page)
+                im.save(imf)
+                page += 1
+                
 
     # writing to a buffer
     imf = io.BytesIO()
 if __name__ == '__main__':
     inline_test('lzw_pon.tiff', 0)
     inline_test('recipe_1.tiff', 1)
+    inline_test('multipage.tiff', 3)
+    

tiffany/test/data/multipage.tiff

Added
New image