- I have a picture called funny-santa.jpg (Google Image it, it is cute)
- I have been able to draw a yellow box ONTO funny-santa.jpg'
- I am able to put TEXT into that yellow box.("Merry Christmas Mom and Dad")
- How do I auto fit text within yellow box i created - Programatically?
- Is it possible to auto-fit the below text to a pre-defined space?
Here is the code to draw a TRANSPARENT Yellow box onto an existing picture. I have added the text 'Merry Xmas Mom and Dad" within the document. The challenge is this: How do I auto-fit my 'Merry Xmas Mom and Dad' within the Box I just created?
What if my text were to change to "I love You Mom and Dad". Any 'hard-coded values' based on text dimension would have to be redone.
convert funny-santa.jpg -strokewidth 0 -fill "rgba( 255, 215, 0 , 0.5 )" -draw "rectangle 0,0 1024,350" -pointsize 30 -fill black -annotate +67+60 'Merry Christmas Mom and Dad' output.jpg