1

我正在尝试在我的 android 应用程序上使用 JPEGImageDecoder 接口,但我的应用程序意外停止。以下代码片段:

import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGImageDecoder;

InputStream in = new FileInputStream(filename);
JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(in);

为什么我的应用程序意外停止或者我可以在 android 上使用这些包吗?

4

1 回答 1

0

不要以为你可以在 android 上使用这些包。Android 使用BitmapFactory (android.graphics.BitmapFactory) 来处理图像解码。堆栈跟踪显示什么?

于 2011-07-17T13:50:59.467 回答