shibu_pu has asked for the wisdom of the Perl Monks concerning the following question:

Hi

I am displaying some text over an image using the Annotate function and the parameters x, y, font, pointsize etc. If the text is too large it is going out of the image. In such conditions, is there any way to display the overflowed text in the next line?

Replies are listed 'Best First'.
Re: Image::Magick Annotate text overflow
by Anonymous Monk on May 25, 2009 at 11:40 UTC
      Thank You

      I used both label and caption to fix it. I split the text with spaces in to words and using label method, I created an image with the longest word and recalculated the pointsize according to that image. Then using that pointsize and caption method, I created a new transparent image with the given image size so that the text was word wrapped. Then I used composite to put this transparent image over the given background image.