create box to fit caption rather than other way around
Posted: 2013-04-29T12:24:52-07:00
Hi,
I am trying to figure out how to create a box of the necessary size to underlay a caption of arbitrary length. As I understand it, that is the opposite of how caption normally works so am a bit stumped.
my requirements are as follows:
image of arbitrary size (typically around 1200 x 800)
caption of arbitrary length, white type on solid color background, laid on top of bottom of image, typically one or two lines high x at most image width
caption can be arbitrary font
fontsize is 11
if caption height exceeds X% of image height, caption is too long, so report error forcing user to modify caption
in other words, I need to create a background box that is just big enough to hold the caption.
I am trying to figure out how to create a box of the necessary size to underlay a caption of arbitrary length. As I understand it, that is the opposite of how caption normally works so am a bit stumped.
my requirements are as follows:
image of arbitrary size (typically around 1200 x 800)
caption of arbitrary length, white type on solid color background, laid on top of bottom of image, typically one or two lines high x at most image width
caption can be arbitrary font
fontsize is 11
if caption height exceeds X% of image height, caption is too long, so report error forcing user to modify caption
in other words, I need to create a background box that is just big enough to hold the caption.