Write Content within Transparent Box
Posted: 2014-12-26T13:03:44-07:00
xecutive Overview:
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?
-- End
Dear Friends,
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 challange 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
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?
-- End
Dear Friends,
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 challange 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