使用Jimi处理图像
2009-12-10 10:58
183 查看
Jimi是Java的图像管理类库,主要提供的是Image IO的功能,其前身是Activated Intelligence。Jimi支持包括GIF, JPEG, TIFF, PNG, PICT, Photoshop, BMP, Targa, ICO, CUR, Sunraster, XBM, XPM, and PCX在内的各种格式图像。
官方地址:http://java.sun.com/products/jimi/
最简单的方式:
package test;
import java.awt.Image;
import com.sun.jimi.core.Jimi;
import com.sun.jimi.core.JimiException;
public class ImageHelper {
/**
* 转换图片格式,基于jimi.jar
* @param oldFile
* @param newFile
* @return
*/
public static boolean convertImageFormat(String oldFile,String newFile)
{
boolean isok = true;
try {
Image img=Jimi.getImage(oldFile);
Jimi.putImage(img,newFile);
} catch (JimiException e) {
isok = false;
e.printStackTrace();
}
return isok;
}
}
官方地址:http://java.sun.com/products/jimi/
最简单的方式:
package test;
import java.awt.Image;
import com.sun.jimi.core.Jimi;
import com.sun.jimi.core.JimiException;
public class ImageHelper {
/**
* 转换图片格式,基于jimi.jar
* @param oldFile
* @param newFile
* @return
*/
public static boolean convertImageFormat(String oldFile,String newFile)
{
boolean isok = true;
try {
Image img=Jimi.getImage(oldFile);
Jimi.putImage(img,newFile);
} catch (JimiException e) {
isok = false;
e.printStackTrace();
}
return isok;
}
}
相关文章推荐
- 【OpenGL学习】使用Shader做图像处理
- 图像处理(Matlab)-再次学习如何使用Matlab
- 使用python进行图像处理的基本方法
- [转]Python 之 使用 PIL 库做图像处理
- (5编译使用最新opencv)从零开始的嵌入式图像图像处理(PI+QT+OpenCV)实战演练
- 使用GPU提高OpenCV的图像处理运算速度
- 最近在做的图形图像处理项目,使用GDI+(贴图)
- 深度学习中图像的指定图像位置的裁剪处理-使用python、opencv
- Windows下Matlab使用G++ DLL实现图像处理
- Matlab图像处理:使用函数将彩色图转换为灰度图
- python使用PIL库做图像处理
- 【使用技巧】【图像编辑和处理】将多幅图片放到一块方便对比
- 图形图像处理-之-高质量的快速的图像缩放 补充 使用SSE2优化
- 图像处理4_使用 metadata-extractor 修改图片名为拍摄时间
- android 使用NDK进行图像处理(openCV)时的图像转换问题(灰度图显示)
- OpenCV学习笔记(8)VS2008 MFC下使用OpenCV2.0进行简单图像处理
- 使用MATLAB对图像处理的几种方法(下)
- 使用python进行图像处理
- 数字图像处理 CImage类的使用与封装(jpg png gif tif bmp等格式图像的加载、数据读写、保存等功能)
- iOS图像处理(9)使用CoreImage滤镜