添加 'w2p.py'
wmf转png demo
This commit is contained in:
parent
d2fe9d0884
commit
4d9dcd03a0
11
w2p.py
Normal file
11
w2p.py
Normal file
@ -0,0 +1,11 @@
|
||||
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)
|
Loading…
Reference in New Issue
Block a user