hi all,
im using imagemagick (v. 6.7.3 q16).
im very new at it.
my problem is the following: i have an image (let's say image.jpg).
what i want to do is to insert this image inside a white image in the center. i want the image.jpg to be opaque (the "white" of the other image if it's bigger than image.jpg it's going to be seen only in the outside area of image.jpg)
could you please give me some tips to solve this?
many thanks for your time
Insert an image into another
Re: Insert an image into another
There are a few different ways to do this; try:
You could add the white to the image ( extent needs to be the size of your white image ):
Code: Select all
convert image.jpg white.jpg -gravity center -composite -matte output.jpg
Code: Select all
convert image.jpg -background white -gravity center -extent 800x800 output.jpg
Re: Insert an image into another
many thanks!!
i think, meanwhile, i found another way as well eheh:
many thanks for your answer!!!!!
i think, meanwhile, i found another way as well eheh:
Code: Select all
composite -gravity Center image.jpg white.jpg result.jpg
Re: Insert an image into another
As I said there are lots of ways to do what you wanted.
I tend to use convert as you could for example resize your image.jpg or add a border all within the same command which is not always possible with composite.
I tend to use convert as you could for example resize your image.jpg or add a border all within the same command which is not always possible with composite.