I am using the Jmagick library. I want to write text on image, how is it possible ?
I am new in Jmagick but, I used the following code and it might also help you.
ImageInfo ii = new ImageInfo("abc.jpg"); MagickImage mi = new MagickImage(); DrawInfo drawText = new DrawInfo(ii); drawText.setFill(PixelPacket.queryColorDatabase("white")); drawText.setFont("Times New Roman"); drawText.setText("News Track India"); drawText.setTextAntialias(true); mi.annotateImage(draw); mi.setFileName("xyz.jpg"); mi.writeImage(ii);
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.