Python PIL For Loop to work with Multi-image TIFF -
each tiff file has 4 images in it. not wish extract , save them if possible, use loop @ each of them. (like @ pixel [0,0] )and depending on color in 4 accordingly.
is possible using pil? if not should use.
you can use "seek" method of pil image have access different pages of tif (or frames of animated gif).
from pil import image img = image.open('multipage.tif') in range(4): try: img.seek(i) print img.getpixel( (0, 0)) except eoferror: # not enough frames in img break
Comments
Post a Comment