在的WritableRaster机器人 [英] WritableRaster in android

查看:144
本文介绍了在的WritableRaster机器人的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有如下一段code的:

I have following piece of code:

private static byte[] accessBytes(Bitmap  image)
  // access the data bytes in the image
  {
    WritableRaster raster = image.getRaster();
    DataBufferByte buffer = (DataBufferByte) raster.getDataBuffer();
    return buffer.getData();
  }  // end of accessBytes()

我想转换此code,这样它会在我的Andr​​oid应用程序的工作,有什么办法可以做到这一点?
我也有在java中工作code,我可以让这个code的类库,然后在android导入?将这项工作?

I want to convert this code so that it will work in my android application, is there any way I can do that? I also have the working code in java, can i make a class library of this code and then import in the android? will this work?

推荐答案

是的,Android的支持Java。您可以在Android的事件作为一个库使用Java code。尝试开始于 developer.android.com

Yes, android supports Java. You can use Java code in an Android event as a library. Try starting at developer.android.com.

这篇关于在的WritableRaster机器人的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆