Notice
Recent Posts
Recent Comments
Link
아미(아름다운미소)
JPEG 섬네일 생성하기 본문
JPEG 섬네일 생성하기
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' 카테고리의 다른 글
pymssql CRUD 예제 (0) | 2018.08.09 |
---|---|
이미지 파일 확인하기 (0) | 2018.06.07 |
Python 파일을 JPEG으로 변환하기 (0) | 2018.06.03 |
파이썬 - URLLIB2 세트 프록시 (0) | 2018.04.22 |
Python을 사용하여 XML 파싱하기 (0) | 2018.03.04 |
Comments