I'm creating an image of a string of text with imagemagick and I need both the width and height of the image to conform to the size of the text.
Currently, I use the "caption" command and specify a width of 300px, so the image is always 300px wide, and开发者_高级运维 the text wraps if it is longer than 300px.
I guess I would need to still specify a maxwidth somewhere in the imagemagick code, so that the text still wraps at 300px.. but I would like width of the image to fit the longest line of the wrapped text and not be exactly 300px. Is this possible?
精彩评论