Hi,
There will be few lines of text (variable lengths)
If i have a background image with fixed width, how can i use the text to extend that background to create an image?
Text with reapeated background?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Text with reapeated background?
agriz wrote:Hi,
There will be few lines of text (variable lengths)
If i have a background image with fixed width, how can i use the text to extend that background to create an image?
I am not really sure what you are asking to do. Can you provide links to an example of your data?
In the meantime, look at -extent to expand the background of any image to a larger canvas? see http://www.imagemagick.org/Usage/crop/#extent
Or perhaps you want to tile out the text? see http://www.imagemagick.org/Usage/canvas/#tile
Re: Text with reapeated background?
I want to tile. I will explain it in detail
I use this code.
* I have an background image with 100*100 size
* I want to tile that image while creating text (image).
The above code works for any length text. I want to now tile an background image instead of background color.
How to do it?
Thanks
Code: Select all
convert -background gray -gravity center -fill blue -font Ravie -pointsize 24 -size 360x caption:'test\ntest\ntest' image.jpg
* I have an background image with 100*100 size
* I want to tile that image while creating text (image).
The above code works for any length text. I want to now tile an background image instead of background color.
How to do it?
Thanks
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Text with reapeated background?
You cannot tile a background image until you know how big your text image is going to be. So you need to separate the steps or create a step that finds out how big the text image will be and then recreate the tiled background with that size and then overlay the text on it.
See the "Get Wet" example at http://www.imagemagick.org/Usage/text/#annotate_size
That is probably what you want to do.
Alternately, see the examples at http://www.imagemagick.org/Usage/compose/#tile These are bit more straightforward.
In any case you can see what is being done by inserting -write tmpX.png after each important step and track the progress and what happens by looking at the tmpX.png images.
See the "Get Wet" example at http://www.imagemagick.org/Usage/text/#annotate_size
That is probably what you want to do.
Alternately, see the examples at http://www.imagemagick.org/Usage/compose/#tile These are bit more straightforward.
In any case you can see what is being done by inserting -write tmpX.png after each important step and track the progress and what happens by looking at the tmpX.png images.
Re: Text with reapeated background?
I will check out those example and let you know today