Images in Image stacks defy gravity
Posted: 2010-03-03T22:07:32-07:00
I have been creating book covers with convert. I make a large rectangular canvas for the entire wrap around cover, then a image stack for the front that I float right (-gravity east), and then an image stack for the back that I float left (-gravity west). The images I float towards the spine, so I need to gravity them in the opposite direction of the front and back stacks. With ImageMagick-6.4.0 and prior this technique worked fine. A few short revs later, it stopped working and it still does not with 6.6.0. The annotations in the stacks respect the bounds and gravity of the stack, however images in the stack do not. If the front stack is gravity east, and the front image is gravity west to snug up against the spine, the front image gravitates allll the way to western most edge of the entire image, ignoring the -size of the stack.
Did something change with regards to image gravity inside stacks that causes them to ignore the stack size? I have tried offsets and many other techniques with no luck.
Here is the convert statement:
Did something change with regards to image gravity inside stacks that causes them to ignore the stack size? I have tried offsets and many other techniques with no luck.
Here is the convert statement:
Code: Select all
convert -quality 95 -size 7307x3675 xc:#000000 \
# Front Image Stack \
-gravity east \( -size 3638x3675 xc:none -gravity center \( -gravity northwest -resize 3638x3675! '/path/to/cover_front.jpg' \) -composite \) -compose over -composite \( -size 3638x3675 xc:none -pointsize 150 -fill '#FFFFFF' -stroke black -strokewidth 3.33 -gravity northwest -annotate +280+280 'This is the TITLE' -pointsize 100 -fill '#FFFFFF' -stroke black -strokewidth 3.33 -gravity southeast -annotate +280+280 'By John Smith' \) -compose over -composite \
#Back Image Stack \
-gravity west \( -size 3638x3675 xc:none -gravity center \( -gravity northeast -resize 3638x3675 "/path/to/cover_back.jpg" \) -composite \) -compose over -composite "/path/to/final_cover.jpg"