How to set an offset with a background picture

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?".
Post Reply
sorcer1
Posts: 4
Joined: 2010-01-18T03:22:42-07:00
Authentication code: 8675309

How to set an offset with a background picture

Post by sorcer1 »

Hello,

Il want to do something like that (it is a tempalte and not the real pictures) :
Image

The black picture (the blue is the transparent color) have a background (the green picture).
So i use this in command line :

Code: Select all

convert ( background.jpg -resize 960x576 -geometry +50+50 ) black.png -composite result.png
I can see the 2 pictures with the transparency but without the offset.

how can i do this ?
sorcer1
Posts: 4
Joined: 2010-01-18T03:22:42-07:00
Authentication code: 8675309

Re: How to set an offset with a background picture

Post by sorcer1 »

I read again the doc, and my problem is to change the position of the background picture.

Doc :
"It's position is fixed and usually forms the canvas which you are building, thus the name background. Remember this!"
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How to set an offset with a background picture

Post by snibgo »

"-geometry +50+50" should come after the second image, not the first.
snibgo's IM pages: im.snibgo.com
sorcer1
Posts: 4
Joined: 2010-01-18T03:22:42-07:00
Authentication code: 8675309

Re: How to set an offset with a background picture

Post by sorcer1 »

it doesn't work.

but i found a solution :

Code: Select all

convert -size 960x576 xc:black -draw "image over 290,-20 730,410 'background.jpg'" -draw "image over 0,0 960,576 'front.png'" result.png
Post Reply