Permalink
14 lines (11 sloc)
362 Bytes
|
from PIL import Image |
|
import glob |
|
|
|
for name in glob.glob('*.tif'): |
|
im = Image.open(name) |
|
name = str(name).rstrip(".tif") |
|
im.save(name + '.jpg', 'JPEG') |
|
|
|
for name in glob.glob('*.tiff'): |
|
im = Image.open(name) |
|
name = str(name).rstrip(".tiff") |
|
im.save(name + '.jpg', 'JPEG') |
|
|
|
print "Conversion from tif/tiff to jpg completed!" |
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.