hello,
I have a little problem using imagemagick.
What i want to do is create an image with x images.
It is working perfectely like this :
convert -size 285x285 xc:#1582cb \
image1.jpg -geometry 129x65+13+15 -composite \
image2.jpg -geometry 114x51+159+217 -composite \
final.jpg
But it take exactely image1.jpg and image2.jpg. I want to make a crop from this images in add.
Thanks for your answers..
crop inside a composite image
crop inside a composite image
Last edited by babwar on 2008-01-23T06:47:22-07:00, edited 1 time in total.
Re: crop inside a composite image
I add an image to make it clear :
I want to create a background blue and depose inside 2 images that i can dispose where I want. I can in the same time crop this images.
Exemple in image :
How can i do this in one command line ?
I want to create a background blue and depose inside 2 images that i can dispose where I want. I can in the same time crop this images.
Exemple in image :
How can i do this in one command line ?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: crop inside a composite image
You can crop images when reading them using special image read modifiers. These include, resizing, or cropping the images being read. To do both use the crop method, the resize.
http://imagemagick.org/Usage/files/#read_mods
the alturnative is to use parenthesis to process just the one image before adding it to the canvas.
Parenthesis... http://imagemagick.org/Usage/basics/#parenthesis
the -flatten is type of multi-image -composition operator.
See Image layering http://imagemagick.org/Usage/layers/
It also can create a background canvas of a specific size, basied on the virtual canvas size of the first image in the image sequence.
Basically you have only just scratched teh surface of multi-image compositions.
http://imagemagick.org/Usage/files/#read_mods
the alturnative is to use parenthesis to process just the one image before adding it to the canvas.
Code: Select all
convert canvas.png \
....
\( new_image.jpg -crop 100x100+20+30 +repage \
-resize 50x50 -repage +300+200 \) \
....
-flatten result.png
the -flatten is type of multi-image -composition operator.
See Image layering http://imagemagick.org/Usage/layers/
It also can create a background canvas of a specific size, basied on the virtual canvas size of the first image in the image sequence.
Basically you have only just scratched teh surface of multi-image compositions.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/