我可以使用 j2me 应用程序截取手机屏幕截图吗?
我正在尝试开发一款无线电话投影仪,其中我将使用连接电脑的投影仪在投影仪上显示手机屏幕。
我对如何捕获 j2me 中任何正在运行的应用程序的屏幕截图感到有点困惑。
你能帮忙吗?
只是想在 j2me 中捕获屏幕截图
I am trying to develop a wireless phone projector, wherein I will be showing phone screen on projector using a projector connected PC.
I am bit confused on how to capture screenshot of any running application in j2me.
Can you help?
Just want to capture screenshot in j2me
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不太确定你想做什么,但如果你正在考虑一种方法让你的应用程序获取屏幕截图,那么我可以说你可以做到,但不能做到。为什么你做不到?假设您在创建屏幕时使用画布。我认为没有办法将画布转换为图像。画布仅限于在手机屏幕上绘制自身。但是,就像我之前所说的,您还可以创建应用程序屏幕的屏幕截图。您需要在 Canvas 上拥有一个 Image 对象。为什么是图像?这是因为Image对象可以转换为图像文件。图像文件将是您的屏幕截图。但是,当然,应该有一些东西可以动态地为画布上的图像对象创建图像源。
创建屏幕的方法:
您可以使用myScreen进行屏幕截图。这里的缺点是渲染速度相当慢。这是可能的,但我认为这有点难以实施。
I'm not really sure of what you wanted to do but if you are thinking of a way for your app to get a screenshot of its screen then what I can say is that you can and cannot do it. Why you cannot do it? Say your using a canvas in creating your screen. I think there isn't a way of converting the Canvas to an Image. The Canvas is limited to just drawing itself on the phone screen. But, like what I have said earlier, you can also create a screenshot of your app screen. What you need to have is an Image object over your Canvas. Why Image? It is because the Image object can be converted to an image file. And the image file will be your screenshot. But, of course, there should be something that dynamically creates the image source for the image object on the canvas.
A method that creates the screen:
You can have a screenshot using myScreen. The drawback here is that rendering is quite slow. This is possible but I think this is kind of difficult to implement.
使用此代码片段,您可以对应用程序中的画布进行“屏幕截图”:
将 getScreenShot() 添加到您想要“屏幕截图”的任何画布。然后您可以获得它的 RGB 并转换为byte[] 并将其在网络上传递。
参考资料:
developer.nokia
With this snippet code you can take a "screenshot" of the Canvases in your app:
Add getScreenShot() to any canvas that you want "screenshot" of it.Then you can get it's RGB and convert to byte[] and pass it on the network.
References:
developer.nokia