wmf2png/w2p.py
2022-06-17 22:41:08 +08:00

11 lines
310 B
Python

from PIL import Image
import os
mapfile = "C:\\Users\\Administrator\\Desktop\\1.wmf"
im = Image.open(mapfile)
path = str(os.path.dirname(mapfile))
onlyfilename, ext = os.path.splitext(os.path.basename(mapfile))
str_onlyfilename = str(onlyfilename)
im.save(path + '\\'+ str_onlyfilename + '.png', quality=95)