in reply to random ImageMagick questions

First, I assume that you know the actual dimensions of the white box - determining it's dimensions if you're given the picture, is a separate problem.

Second, going through Image::Magick's documentation, their support of text if not very advanced. Perhaps you'd find it easier to use GD::Text. Not only does it support TrueType fonts, but the width method will return the width of text in pixels - which is exactly what you need to determine where to wrap your string.