Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Python:マルチページTIFFを読み込んで1ページずつ処理する
from PIL import Image
# Tiff画像を読み込む
image = Image.open('C:\\Users\\ochi\\temp\\sample2.tif')
#ページ数を求める
fLength =image.n_frames
#1ページずつ抜き出して処理
for i in range(0,fLength+1):
image.seek(1)
sImg =image.copy()
# 以下で何らかの処理
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment