I\'ve an app that takes a camera picture and saves on sdcard as jpeg. i want to distort the picture with a spherize filter. I can read the jpeg to a bitmap, but the code i h
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.