无法加载javax.imageio.ImageIO中的lib到Eclipse [英] Can't load javax.imageio.ImageIO lib to Eclipse

查看:695
本文介绍了无法加载javax.imageio.ImageIO中的lib到Eclipse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想画布对象保存为图像,而为了这个,我想要使用的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).

这篇关于无法加载javax.imageio.ImageIO中的lib到Eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆