Page 1 of 1

How to insert rotate images or text over a image?

Posted: 2007-02-02T19:28:22-07:00
by jalo
Hello,

I want to insert a rotate image over another image but the command that i'm using don't work. I use:

Code: Select all

convert FONDO.jpg -draw "image Over 35,110 0,0 out.jpg" -draw "image Over 35,860 0,0 out.jpg" -draw "image Over 35,1610 0,0 out.jpg" -draw "image Over 35,2360 0,0 out.jpg" -draw "rotate 90 image Over 1580,110 0,0 out.jpg" -draw "rotate 90 image Over 1580,1650 0,0 out.jpg" salida.jpg
The problem is that the images that will be rotated, don't appear, nor rotated.

What is happening?

NOTE: I have the same problem inserting text with -draw "rotate degrees text..."

Thanks :)

Posted: 2007-02-03T05:09:29-07:00
by Bonzo
Give this a go:

Code: Select all

exec("/usr/local/bin/convert background_image.jpg \( top_image.jpg -rotate \"-25\" \) -composite output_image.jpg"); 

Posted: 2007-02-03T06:37:36-07:00
by jalo
Bonzo wrote: Give this a go:

Code: Select all

exec("/usr/local/bin/convert background_image.jpg \( top_image.jpg -rotate \"-25\" \) -composite output_image.jpg"); 


Thanks for the suggestion but, in this command where i put the coordenates where the rotated image will be put?

Thanks.

Posted: 2007-02-03T07:55:56-07:00
by Bonzo
You will need to add a position using the -geometry comand.

Code: Select all

exec("/usr/local/bin/convert background_image.jpg \( top_image.jpg -rotate \"-25\" \) -geometry +43+70 -composite output_image.jpg"); 

Posted: 2007-02-03T13:45:20-07:00
by jalo
Hello,

Thanks for the replies but.. i think that i'm making some wrong because i can't obtain the result that i want.

I have this two "commands":

Code: Select all

convert ZABlanco.jpg -font "ZA.ttf" -pointsize 180 -draw "text 877,538 '1.30'" -draw "text 859,363 '01/02'" -draw "text 864,186 '10:50'" -font "ZA.ttf" -pointsize 205 -draw "text 79,370 '07'" -font "ZA.ttf" -pointsize 125 -draw "text 89,223 '105979'" out.jpg

convert out.jpg -rotate 90 out.jpg

convert out.jpg -font "ZA.ttf" -pointsize 55 -draw "text 70,1200 '01/02/07'" -draw "text 324,1200 '09:05'" -draw "text 485,1200 '1099'" -draw "text 56,1325 '01/02/07'" -draw "text 323,1325 '17:50'" -draw "text 455,1325 '1099'" -draw "text 108,1375 '1.30'" -draw "text 267,1375 '01/02'" -draw "text 455,1375 '10:50'" -font "ZA.ttf" -pointsize 60 -draw "text 55,1375 'n'" out.jpg

convert out.jpg -rotate -90 out.jpg
and

Code: Select all

convert out.jpg -rotate 90 outRotado.jpg

convert FONDO.jpg -draw "image Over 35,110 0,0 out.jpg" -draw "image Over 35,860 0,0 out.jpg" -draw "image Over 35,1610 0,0 out.jpg" -draw "image Over 35,2360 0,0 out.jpg" -draw "image Over 1580,110 0,0 outRotado.jpg" -draw "image Over 1580,1650 0,0 outRotado.jpg" salida.jpg
It's possible to see that in the first, i try to put some texts in a image, and some of this text's i want to insert rotated 90 degrees. How i don't know how to make all in one sentence, i insert the text that will be inserted "normally", rotate the image, and insert the second text (the text that will appear rotated), and rotate again the image to the original position.

In the second case, i make a temporal file named "outRotado" that is rotated 90 degrees, and i put the files "out.jpg" and "outRotado.jpg" over FONDO.jpg.. It's possible to see that i make outRotado.jpg because i can't insert the image rotated directly..

If anyone can help me saying me how will be this two posibilities in only one command.. i'll be thankful. (In Windows format, please).

Thanks.