- 安装 Pillow
pip install Pillow
- 运行环境
python 3.7
- 直接导入需要的包
pip install -r requirements.txt
filePath = os.path.dirname(os.path.abspath(__file__)) + '/'
fileNewPath = filePath + 'newimg/'
scale = 0.2
quality = 100
basename = 'newimg-'
参数 | 说明 | 默认值 |
---|---|---|
filePath | 当前工具运行的文件路径 | './' |
fileNewPath | 当前工具运行的文件夹下新建一个文件保存压缩后的图片 | './newimg/' |
scale | 图片宽高压缩比例,如原图100200,压缩后2040 | 0.2 |
quality | 图片压缩后的模糊度 | 100 |
basename | 图片压缩后重命名的前缀 | newimg- |
python compressImg.py
- 安装 requests
pip install requests
- 运行环境
python 3.7
skinsFolder = 'lol_skins'
- 直接导入需要的包
pip install -r requirements.txt
参数 | 说明 | 默认值 |
---|---|---|
skinsFolder | 当前工具运行的文件路径保存皮肤海报的文件夹 | 'lol_skins' |
python downloadSkins.py