Notice
Recent Posts
Recent Comments
Link
아미(아름다운미소)
이미지 파일 확인하기 본문
Python 이미지 파일 확인하기
이미지 파일들의 집합을 빠르게 확인하는 단순한 스크립트입니다.import os, sys import Image size = 128, 128 for infile in sys.argv[1:]: outfile = os.path.splitext(infile)[0] + ".thumbnail" if infile != outfile: try: im = Image.open(infile) im.thumbnail(size) im.save(outfile, "JPEG") except IOError: print "cannot create thumbnail for", infile
'랭귀지 > python' 카테고리의 다른 글
[ftplib] python ftp file upload (0) | 2018.08.10 |
---|---|
pymssql CRUD 예제 (0) | 2018.08.09 |
JPEG 섬네일 생성하기 (0) | 2018.06.04 |
Python 파일을 JPEG으로 변환하기 (0) | 2018.06.03 |
파이썬 - URLLIB2 세트 프록시 (0) | 2018.04.22 |
Comments