【发布时间】:2022-12-23 03:51:10
【问题描述】:
我正在测试 android adb 以进行屏幕捕获。然后我可以全屏截图,现在我要捕捉坐标。我使用以下命令行:
adb shell screencap -p -d 0 /sdcard/test.png
使用此命令行,我捕获了全屏。查阅了n+1个地方,得知下面的命令行是按坐标抓取的(坐标放在-d id后面)
adb shell screencap -p -d 0 266 655 664 554 /sdcard/test.png
但是运行后返回结果如下,谁能帮帮我
usage: screencap [-hp] [-d display-id] [FILENAME]
-h: this message
-p: save the file as a png.
-d: specify the display id to capture, default 0.
If FILENAME ends with .png it will be saved as a png.
If FILENAME is not given, the results will be printed to stdout.
【问题讨论】:
-
捕获完整图像,然后使用其他命令行工具裁剪图像。例如,ImageMagick 可以做到这一点。
-
@CommonsWare 非常感谢你!
标签: python android android-emulator adb