I need to convert from PNG to JPG.
However, iMagick adds a black background to it.
I saw this question , which is for PHP, and tried to write the same for java, like this:
ConvertCmd cmd = new ConvertCmd();
IMOperation op = new IMOperation();
op.addImage(brandingURL);
op.format("JPEG");
op.composite();
op.background("white");
op.addImage(imageLocation);
cmd.run(op);
But still the image comes out with a black background.
What am I missing?
source
share