fengbohan 0d71fb70b3 init | 9 hónapja | |
---|---|---|
ReadMe.md | 9 hónapja | |
color.jpg | 9 hónapja | |
color.png | 9 hónapja | |
gray.png | 9 hónapja | |
img.py | 9 hónapja | |
output.png | 9 hónapja | |
requirements.txt | 9 hónapja |
安装依赖
pip install -r requirements.txt
运行程序
# 黑白
python .\img.py .\color.png -t
# 灰度
python .\img.py .\color.png -g
# 反色
python .\img.py .\color.png -i
usage: img.py [-h] [-g | -i | -t] [-o OUTPUT] img
positional arguments:
img input img file name
options:
-h, --help show this help message and exit
-g, --gray convert color img to gray
-i, --invert invert color img
-t, --threshold to produce a black and white image
-o OUTPUT, --output OUTPUT
output img file name