2

I need to know how to translate a imagemagick commandline-command into java im4java code commandline:

convert -limit memory 40GiB -define registry:temporary-path=F:\\imageMagick Row_1.png Row_2.png -append Row_12.png"

I know how to use convert and -append in im4java but what about -define and -limit? Here is what I got:

    IMOperation op = new IMOperation();
    op.addImage("Row_1.png","Row_2.png");
    op.appendVertically();
    op.addImage("Row_12.png");                      
    cmd.run(op);

maybe just add op.limit("memory 40GiB") and op.define("registry:temporary-path=F:\\imageMagick") ? I don't know whether it is the same..

Selphiron
  • 897
  • 1
  • 12
  • 30

2 Answers2

5

The op.limit() is buggy and I had to use addRawArgs("-limit","memory","20GiB") instead of op.limit("memory 40GiB") source: http://sourceforge.net/p/jmagick/mailman/message/33285563/

Selphiron
  • 897
  • 1
  • 12
  • 30
1

You are correct. To view the actual command you will be generating put this line of code in before cmd.run(op)

System.out.println(op.toString());
  • hey, thanks for the answer. I asked in the mailing list and op.limit is buggy. See here: http://sourceforge.net/p/jmagick/mailman/message/33285563/ – Selphiron Feb 24 '15 at 21:46