Created
July 18, 2017 07:43
-
-
Save ochilab/962483a0c240133961c40de60b1d0aae to your computer and use it in GitHub Desktop.
Python:マルチページTIFFを読み込んで1ページずつ処理する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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