无法加载javax.imageio.ImageIO中的lib到Eclipse加载、javax、imageio、Eclipse

由网友(从此一人孤独过)分享简介:我想画布对象保存为图像,而为了这个,我想要使用的ImageIO类。我使用的Eclipse,但是当我试图让这个LIB(进口javax.imageio.ImageIO中;)进口Eclipse是显示了我一个错误进口javax.imageio中无法得到解决。 PLS。告诉我,我必须做的来解决这个问题,进口的ImageIO li...

我想画布对象保存为图像,而为了这个,我想要使用的ImageIO类。我使用的Eclipse,但是当我试图让这个LIB(进口javax.imageio.ImageIO中;)进口Eclipse是显示了我一个错误进口javax.imageio中无法得到解决。 PLS。告诉我,我必须做的来解决这个问题,进口的ImageIO lib添加到我的项目。

I want to save canvas object as image, and for this I want use ImageIO class. I'm using Eclipse, but when I try make import of this lib (import javax.imageio.ImageIO;) Eclipse is shows me an error "The import javax.imageio cannot be resolved". Pls. tell me what I have to do to solve this problem and import imageio lib to my project.

感谢

推荐答案

您已经标记了Android您的问题。 javax.imageio.ImageIO中不是Android平台的一部分,所以很遗憾不能使用它。相反,你需要使用什么是可用在Android SDK的读取和存储图像。

You have tagged your question with Android. javax.imageio.ImageIO is not part of the Android platform, so unfortunately you can't use it. Instead you need to use what's available in the Android SDK for reading and storing images.

有一个看位图和的 BitmapFactory 类的起点。

Have a look at the Bitmap and BitmapFactory classes for a starting point.

这些类包含了必要的方法来读取( BitmapFactory.de code *(......)方法),写(位图.COM preSS(...)法)。

These classes contains the necessary methods to read (BitmapFactory.decode*(...) methods) and write (Bitmap.compress(...) method).

阅读全文

相关推荐

最新文章