一种开箱即用,使用通用语言描述的 📷 图像命令行工具。🔧
ImageCli是一个简单的命令行界面,旨在有效地处理图像操作,允许用户通过简单的描述性命令执行基本任务(无需理解复杂的工具设计,言出法随🪄)
pip install open-image-cliimg size -f '/Users/youngfreefjs/Downloads/logo.png'
>> Image Pixels Size: 1024x1024img file-size -f '/Users/youngfreefjs/Downloads/logo.png'
>> Image File Size: 496470.00 bytes设置返回文件大小的单位 (e.g. bytes, KB, MB):
img file-size -f '/Users/youngfreefjs/Downloads/logo.png' -u MB
>> Image File Size: 0.47 MBimg compress -f '/Users/youngfreefjs/Downloads/logo.png' -t 0.1 -u MB
>> Compressed image saved to: /Users/youngfreefjs/Downloads/compressed_logo.png
>> Compressed Image Size: 0.09 MBimg background -f '/Users/youngfreefjs/Desktop/code/github/imagecli/static/passport_photo_blue.png' -c 'RED'
>> Image resolution: 1536x1024, Channels: 3
>> Modified image background `red` saved to: /Users/youngfreefjs/Desktop/code/github/imagecli/static/background_RED_passport_photo_blue.png| Original Photo | RED Background Photo | WHITE Background Photo |
|---|---|---|
![]() |
![]() |
![]() |
Code by: my former company
@Meituan-Dianping
请保障前面一张截图后,向上滚动1/3再截图第二张图
你可以手工操作截图(从屏幕高度2/3,向上滑动至1/3)
或者通过UI自动化截图,屏幕高度2/3 to 1/3
img merge -i '/Users/youngfreefjs/Desktop/code/github/imagecli/static/image_merge/taobaoPage1.JPG' -i '/Users/youngfreefjs/Desktop/code/github/imagecli/static/image_merge/taobaoPage2.JPG' -i '/Users/youngfreefjs/Desktop/code/github/imagecli/static/image_merge/taobaoPage3.JPG' -o '/Users/youngfreefjs/Desktop/code/github/imagecli/static/image_merge/merged.png'
>> Merged image saved to: /Users/youngfreefjs/Desktop/code/github/imagecli/static/image_merge/merged.png| Original Images | Page1 Images | Page2 Images | Page3 Image |
|---|---|---|---|
![]() |
img ocr -f '/Users/youngfreefjs/Desktop/code/github/imagecli/static/image_merge/taobaoPage720P.JPG'
>> [
{
"content": "19:29",
"leftTopX": 42.00000074999997,
"leftTopY": 23.999999724999952,
"width": 71.5,
"height": 22.00000000000003,
"tags": {
"confidence": 0.5
}
},
...
]|




