Rotating, merging and cropping batch of images
Posted: 2017-03-16T07:16:20-07:00
Hi there,
I have the need to rotate pairs of images, stitch them horizontally and then crop to a certain size. Currently I'm doing this one step at a time and producing lots of excess images as my attempts to pipe outputs is failing me. I'm trying to do something like the following in Powershell:
magick (convert "d:\a folder with spaces\01022017083759_01.jpg" -rotate 270 -quality 100 "d:\a folder with spaces\rotated\01022017083759_01_rot270.jpg") (convert "d:\a folder with spaces\01022017083759_02.jpg" -rotate 90 -quality 100 "d:\a folder with spaces\rotated\01022017083759_02_rot90.jpg") "d:\a folder with spaces\rotated\01022017083759_02_rot90.jpg" "d:\a folder with spaces\rotated\01022017083759_01_rot270.jpg" +append miff:- | magick - -crop 7633x5767+1975.5+1460.5 +repage "d:\a folder with spaces\cropped\01022017083759_cropped.jpg"
This command runs, but seems to just go forever, hogging CPU resources. Each individual command works fine on its own, outputting to jpegs. What am I doing wrong?
I have the need to rotate pairs of images, stitch them horizontally and then crop to a certain size. Currently I'm doing this one step at a time and producing lots of excess images as my attempts to pipe outputs is failing me. I'm trying to do something like the following in Powershell:
magick (convert "d:\a folder with spaces\01022017083759_01.jpg" -rotate 270 -quality 100 "d:\a folder with spaces\rotated\01022017083759_01_rot270.jpg") (convert "d:\a folder with spaces\01022017083759_02.jpg" -rotate 90 -quality 100 "d:\a folder with spaces\rotated\01022017083759_02_rot90.jpg") "d:\a folder with spaces\rotated\01022017083759_02_rot90.jpg" "d:\a folder with spaces\rotated\01022017083759_01_rot270.jpg" +append miff:- | magick - -crop 7633x5767+1975.5+1460.5 +repage "d:\a folder with spaces\cropped\01022017083759_cropped.jpg"
This command runs, but seems to just go forever, hogging CPU resources. Each individual command works fine on its own, outputting to jpegs. What am I doing wrong?