jpeg图片数据流怎么转png图片数据流?????????
解决方案 »
- amcharts如何让纵坐标层分颜色块!求高手!
- MS sqlserver的分页技术怎么实现
- .java 源文件中的 link
- 高手进阶篇:Jive中Jdom使用方法解析
- Lucene In Action中文版
- 学完EJB还用学hibernate,spring么????
- Exception in thread "main" org.apache.axis2.AxisFault: could not execute query
- File f = new File("."); f.load("xx.properties"); web 应用下为何在要目录下去读取,而不是在类路径下或是类顶层目录下?
- 请问如何使用jb9.0部署rmi
- 一个简单问题!
- 出现Exception in thread "main" java.lang.NoClassDefFoundError:
- xml与数据库数据交换的问题?
int w = ii.getIconWidth();
int h = ii.getIconHeight(); Image image = ii.getImage();
//image = image.getScaledInstance(w / 1024, h / 768,
// Image.SCALE_SMOOTH); BufferedImage bi = new BufferedImage(img.getWidth(null), img
.getHeight(null), BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = bi.createGraphics();
g2.drawImage(image, 0, 0, null);
g2.dispose();
try
{
ImageIO.write(bi, "your file suffix", file);
}
catch (IOException e1)
{
e1.printStackTrace();
}
image.read(InputStream in);
image.write(image,"png",OutputStream out);