现在,我正在使用 im4java 和 imageMagick 来处理图片。最近总是出现
org.im4java.core.CommandException:返回码:137
同时我的应用服务器Tomcat7.0也会崩溃。
当然,我的程序是在linux下运行的。不知道怎么办。求帮忙谢谢!我的代码是
public static void cutImage(int width, String srcPath, String newPath) throws Exception {
IMOperation op = new IMOperation();
op.addImage(srcPath);
op.resize(width, null);
op.addImage(newPath);
ConvertCmd convert = new ConvertCmd();
convert.run(op);
}
当我调用这个方法时,有时会发生这种现象。