Python影像處理函式庫
 
有了這個函式庫,使用python來作圖形處理變得相當簡單
 
將圖形轉換成jpg
 
import os, sys
import Image

for infile in sys.argv[1:]:
    f, e = os.path.splitext(infile)
    outfile = f + ".jpg"
    if infile != outfile:
        try:
            Image.open(infile).save(outfile)
        except IOError:
            print "cannot convert", infile
arrow
arrow
    全站熱搜

    CJY0503 發表在 痞客邦 留言(0) 人氣()