1

I want to use imagemagick/im4java to combine two images into a single image -

I have a command that works great in command line.

'composite -gravity center -geometry +25+0 image1.png -compose multiply                                                  
 image2.png output.png`

I want to achieve the same results using im4java.core package, I have this set of commands but it does not give me the right result.

CompositeCmd composite = new CompositeCmd()
IMOperation operation = new IMOperation();
operation.gravity("center")
operation.geometry(25,0)
operation.addImage()
operation.compose("multiply")
operation.addImage()
operation.addImage()

composite.run(operation, "image1.png","image2.png", "output3.png")
Programmer
  • 59
  • 2

0 Answers0