Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
My problem is that I want do it with only setting once the coordinates. The numbers in front can change and I would like to create a view hundred pictures without changing that 2nd coordinates...
convert -size 100x100 xc:lightblue -gravity Center \
-draw "font arial fill '#000000FF' font-size 14 text 2,2 '42.5' \
font verdana fill '#000000FF' font-size 9 text 40,5 'g'" 2tmp.png
text 2,2 is fix and then comes a variable long text... e.g. '42.5' text 40,5 'g' ... has in each of the 3.800 pictures another position...
So I need to find a way where i can continue writing and just change the font and the font-size or i must find out the coordinates of each 2nd text for each of that 3.800 images... And that would be for me a huge problem...
text 2,2 is fix and then comes a variable long text... e.g. '42.5' text 40,5 'g' ... has in each of the 3.800 pictures another position...
So I need to find a way where i can continue writing and just change the font and the font-size or i must find out the coordinates of each 2nd text for each of that 3.800 images... And that would be for me a huge problem...
Sorry I do not understand what you want. You must specify in some way each coordinate for the second part of the text for each of your images. I do not know how you can do that without measuring where each one would be located.
Perhaps I am not understanding your issue. I thought it was just an issue of using two -annotates rather than one command such as -draw with multple locations for text.
If that is not the case, then please explain further.
I need to write in top op tmp.png in the lower left corner some text in font A and then some small text in font B
I have arround 40 Standard-Images in wich in must write some text and save them. The text has at least 2 parts sometimes 3 parts. I need a way to make one textbox write there something, change the font and the fill-color and continue writing in the same position!
If i need to figure out all coordiantes of all text-parts I can do it as well in Photoshop or Gimp.
The point is that I need a way to write there in one line 2-3 text-parts in 2-3 colors and 2 font-sizes all based on the left lower corner.
But i really need to place sings like that inklusive that format and that different colors on a image and that always on the coordinates 2,2 from the lower left corner
Can you make an example and point out what exactly you want done.
As far as I understand, your example and my example using -draw do what you seem to want, namely, one line of code with one -draw that fills in all the different sections of text all relative to one locations.
You can use -gravity southwest and translate with -draw to set the base location of all the fonts and then specify the offsets which will be relative to the 2,2 from the bottom left corner.
For example, here I use -gravity Southwest and translate 10,10 (rather than 2,2)
convert -size 100x100 xc:lightblue -gravity Southwest \
-draw "translate 10,10 font arial fill '#000000FF' font-size 14 text 0,0 '42.5' \
font verdana fill '#000000FF' font-size 9 text 40,5 'g'" 2tmp.png
If this is not what you want, then please provide an example and explain relative to the example.