Issue
How can I capture the screen in .jpg/.jpeg format using 'screencap'?
adb shell screencap -p /sdcard/screencap.jpg
This does not work. I thought changing the extension would help. But it always captures .png. File size in that case is larger than I need.
Solution
screencap
does not support JPEG as output format, see screencap source code.
You need to do the conversion yourself after you pull the file from the device.
This can be done with imagemagick convert
command, for example:
adb shell screencap -p /sdcard/screencap.png
adb pull /sdcard/screencap.png screencap.png
convert screencap.png screencap.jpg
If the file size is still too big, you can resize it:
convert screencap.png -resize 50% screencap.jpg
Answered By - Devstr
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.