I can achieve my purpose with the following cords.
Code: Select all
convert -size 500x1000 xc:white \
\( aaa.jpg -resize 50x50 \) -geometry +50+100 -composite \
\( bbb.jpg -resize 100x100 \) -geometry +100+200 -composite \
final.jpg"
"Do not do this with a lossy image format like "JPEG" as the format errors are accumulative, and the base image will quickly degrade."
in a following page.
https://www.imagemagick.org/Usage/layers/#composite
Shouldn't I use the above cord for JPEG images ?
If so, I tried the following codes too.
Code: Select all
convert -size 500x1000 xc:white \
-page +50+100 \( aaa.jpg -resize 50x50 \) \
-page +100+200 \( bbb.jpg -resize 100x100 \) \
-layers flatten flatten_img.jpg"
Maybe, the "-page +50+100" was also affected by "-resize".
I tried the following codes too.
Code: Select all
convert -size 500x1000 xc:white \
-page +50+100 \( aaa.jpg -resize 50x50 +repage \) \
-page +100+200 \( bbb.jpg -resize 100x100 +repage \) \
-layers flatten flatten_img.jpg"
If I use the above pattern, that is,
Code: Select all
convert ..... -page ..... -flatten
Please help me.
Thank you in advance.