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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -