I am having a tough time figuring out the sequence of events to have a caption of one dimension. Then have this caption on an image of a larger dimension.
Right now my sequence of operations are:
IMOperation op = new IMOperation();
op.background("bgColor");
op.fill("fgColor");
op.pointsize(44);
op.gravity(" Center");
op.font("AppleChancery"); // font
op.size(800, 800);
op.addRawArgs("caption: "+text);
op.resize(1080,1080);
op.addImage("src/test/resources/images/test.jpeg");
cmd.run(op);
This always creates the image at 1080x1080 with the caption using that to calculate the margins.
I've tried running an addImage before the caption call to save the image at one dimension, but I either get a 800x800 image or I get 2 images one 800x800 and one blank.
How should I sequence these operations?
Thanks.