[英]Use android.graphics.Bitmap from Java without Android
I need to use android.graphics.Bitmap in my Java project without Android platform. 我需要在没有Android平台的Java项目中使用android.graphics.Bitmap。 The problem is that I want to process the picture which comes to the server from Android device as a Bitmap.
问题是我想将来自Android设备的服务器图片作为位图进行处理。 So, I need some methods that use native code.
因此,我需要一些使用本机代码的方法。 How can I get these native methods?
如何获得这些本机方法? I tried to find them at http://androidxref.com but if I have, for example,
我试图在http://androidxref.com上找到它们,但是如果有的话,
static int Bitmap_width(JNIEnv* env, jobject, SkBitmap* bitmap) {return bitmap->width();}
clicking width()
refers to the new search where there are lots of classes contating different width()
. 单击
width()
是指新搜索,其中有许多类涉及不同的width()
。
You shouldn't do that. 你不应该那样做。 The android libraries are not meant to be used for non android applications.
android库不是要用于非android应用程序。 Especially the native code.
特别是本机代码。
As long as you send a bitmap image, any non-android library will be able to read it. 只要您发送位图图像,任何非Android库都将能够读取它。
You can event send the image raw pixels. 您可以事件发送图像原始像素。 It's like sending a list of bytes.
就像发送字节列表一样。 Any language will be able to read incomming bytes.
任何语言都将能够读取传入的字节。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.