BufferedImage in Android

耗尽温柔 提交于 2019-11-27 09:20:41

No. You can't use BufferedImage because, like you said, javax.imageio isn't in the Android SDK. The Bitmap class, however, does support getting individual pixels using the getPixel() and getPixels() methods so you should be able to use those to do any type of image transform you want to do.

BufferedImage is part of AWT, which is not implemented in Java. You need to find Android replacements for what you're trying to do.

Read this:

http://developer.android.com/guide/topics/graphics/index.html

You can use Bitmap instead of bufferedimage but this won't resolve your problem since you need make changes on TransformFilter because this code eventually call the super.filter( src, dst ); which is making the actual job. If your only goal is to implement spherize filter, this link provides a direct algorithm for spherize filter which would be easier to port to Android.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!