convert & resize & crop & composite : unexpected results
Posted: 2017-08-18T01:09:00-07:00
I have made a compositie of three images. This works fine!
Command used:
Due to the camera aspect ratio the size of the image becomes: 2362x1575.
However my specs say that the top image should have the size 2362x1766, so I have to resize and crop.
On a single image I used this command and it works perfect. I get the right results.
Then I integrated this command in the first command:
This results in:
Issue: the image is not generated as expected?
Question: What am I doing wrong?
What would be the right command?
Command used:
Code: Select all
magick convert -units PixelsPerInch -size 2362x3543 xc:white
( ADH_20170808_5539.jpg -auto-orient -resize 2362x ) -geometry +0+0 -composite
( ADH_20170808_5578.jpg -auto-orient -resize 1175x ) -geometry +0+1777 -composite
( ADH_20170808_5619.jpg -auto-orient -resize 1175x ) -geometry +1187+1777 -composite -density 300 Sample_no_crop.jpg
However my specs say that the top image should have the size 2362x1766, so I have to resize and crop.
On a single image I used this command and it works perfect. I get the right results.
Code: Select all
magick convert ADH_20170808_5539.jpg -auto-orient -resize "2362x1766^" -gravity Center -crop 2362x1766+0+0 +repage crop_image.jpg
Code: Select all
magick convert -units PixelsPerInch -size 2362x3543 xc:white
( ADH_20170808_5539.jpg -auto-orient -resize "2362x1766^" -gravity Center -crop 2362x1766+0+0 +repage ) -geometry +0+0 -composite
( ADH_20170808_5578.jpg -auto-orient -resize "1175x1766^" -gravity Center -crop 1175x1766+0+0 +repage ) -geometry +0+1777 -composite
( ADH_20170808_5619.jpg -auto-orient -resize "1175x1766^" -gravity Center -crop 1175x1766+0+0 +repage ) -geometry +1187+1777 -composite -density 300 Sample_crop.jpg
Issue: the image is not generated as expected?
Question: What am I doing wrong?
What would be the right command?