I have an image for example:
img = Import[
"http://ultraimg.com/images/2016/07/29/Simplest-Responsive-jQuery-\
Image-Lightbox-Plugin-simple-lightbox.jpg"]
I'm creating a text graphics object:
string = "a test string";
gObj = Graphics[
Text[Style[string, FontSize -> 14, FontFamily -> "Arial", Bold,
White, Background -> Black]]];
and add it to the image in the left bottom corner:
picFinal = ImageCompose[img, gObj, {60, 10}]
Now when I use a longer string:
string = "a test string that is a bit longer ";
this results in the string not fitting. But I need to add strings with variable sizes to the left bottom corner as well. How can I adapt the position of my string such that it always has a specified distance from the left bottom corner and adapt dynamically to the size of the string?