如何使用 LWUIt VIdeoComponent 捕获图像
我尝试过使用 MediaComponent,但由于它现在已被弃用,因此不会有很好的进展。另外,我无法在表单上将其大小调整为全屏。我正在尝试使用 VideoComponent
在 S40 设备中捕获屏幕截图。我无法找到如何正确实例化 VideoComponent
来捕获图像而不播放视频。
I have tried using MediaComponent
, but since it is now deprecated it wont be good moving forward. Also i was not able to get it to re-size to full screen on the form. I am trying to use VideoComponent
to capture a screen shot in an S40 device. I cant find how to instantiate the VideoComponent
properly for capturing an image and not playing a video.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 VideoComponent 来捕获图像。
首先,要实例化 VideoComponent,您需要创建一个本机对等体:
要捕获图像,您必须启动视频组件并使用 Video Control 的 getSnapshot:
如果您想将视频组件调整为全屏,您可以使用:
其他可能性是:
You can use VideoComponent for capturing an image.
First, to instantiate the VideoComponent, you need to create a native peer:
To capture the image, you have to start video component and use getSnapshot of Video Control:
If you want to resize the video component to full screen you can use:
Other posibility is:
目前,
VideoComponent
主要是为播放而设计的,对于捕获来说效果不佳。我们将在不久的将来尝试改进它,使其更加灵活。从MediaComponent
迁移到VideoComponent
相对容易,因此应该不成问题。Right now the
VideoComponent
is mostly designed for playback and doesn't really work well for capture. We will try to improve it in the near future to make it more flexible. Its relatively easy to migrate fromMediaComponent
toVideoComponent
so it shouldn't be a problem.