Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个视频正在播放,在某些时候,我需要暂停视频,进行捕捉,然后在绘画活动中使用该图像来修改它。问题是,如果我尝试保存视频,图片将是黑色的(尝试使用setDrawingCacheEnabled(true);)........ 是否可以截取视频的屏幕截图?
setDrawingCacheEnabled(true);
你有没有尝试过 ThumbnailUtils.createVideoThumbnail(String, int)?
ThumbnailUtils.createVideoThumbnail(String, int)?
试试这个链接..
希望它可以帮助你
屏幕截图
Bitmap saveBitmap = Bitmap.createBitmap(imageFrame.getWidth(), imageFrame.getHeight(), Bitmap.Config.ARGB_8888); Canvas c = new Canvas(saveBitmap); imageFrame.draw(c);
有关更多信息,请尝试此链接
&这个链接
我认为你应该在 android 中使用 screencaputre 应用程序,这对你来说是完全可用的......而不是你可以将你的 android 与 PC 连接而不是启动视频并暂停它的最佳方式,而不是在键盘按下打印屏幕和绘图软件中按 ctrl+V(粘贴)并保存为 jpeg 格式,而不是获得屏幕截图/图像...