StackNow
StackNow

Reputation: 41

org.im4java.core.CommandException: return code: 137

Now,I am using im4java and imageMagick to deal with pictures. Recently,it always appears

org.im4java.core.CommandException: return code: 137

At the same time the Tomcat7.0 that is my Application Server will crash.

Of course,my program run in linux. I do not know how to do.Ask for help thank you! My code is

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);
}

When I call this method.The phenomenon will happend sometimes.

Upvotes: 2

Views: 2429

Answers (1)

Sebastian Röher
Sebastian Röher

Reputation: 417

I had a simlary issue by generating Thumbnails from Videos. Like in the Comment from zawhtut the process gets kill from somewhere. my sfirst solution was to reduce the size of the images (from 1920px to 256px)

Upvotes: 1

Related Questions