如何从 MIDP 本机映像创建 LWUIT Image 对象?
在 LWUIT 的文档中,有 createImage 方法,它从 MIDP 本机映像创建 LWUIT Image 对象( public static Image createImage(java.lang.Object nativeImage) )。
我想知道如何实现 java.lang.Object 参数,以便将 MIDP 本机图像设置为该方法的参数?例如,我从相机捕获照片( byte[] rawImage = myVideoControl.getSnapshot(null);
),并在文件系统中创建图像文件:
myFileConnection = (FileConnection) Connector.open("file:///"+pRoot+photoDirectory+"/"+photoName);
myFileConnection.openOutputStream().write (原始图像);
.那么如何将Object参数传递给createImage方法呢?
In the documentation of LWUIT there is the createImage method which creates a LWUIT Image object from a MIDP native image ( public static Image createImage(java.lang.Object nativeImage) ).
I want to know how to implement the java.lang.Object parameter in order to set a MIDP native image as the parameter of the method ? For example I capture a photo from the camera ( byte[] rawImage = myVideoControl.getSnapshot(null);
) and I create the image file in the filesystem :
myFileConnection = (FileConnection) Connector.open("file:///"+pRoot+photoDirectory+"/"+photoName);
myFileConnection.openOutputStream().write(rawImage);
. So how to pass the Object parameter to the createImage method ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
编辑:
看
EDIT:
see