snibgo wrote: ↑2019-05-09T15:25:18-07:00
Then you need two offsets. The second could be:
Code: Select all
-set option:offset2 "%[fx:h/2+15]"
... then use:
I really appreciate your patience here snibgo, however that is still not the issue. I'll try to explain once more, step by step, otherwise I will have to settle for full with stampcard option variables.
A fully written out code (line by line), would look like this then, I post calculated variables here so it is a "working" command, which does not fill it up the way i intended, BUT does show my issue (hopefully):
Base Image size = 500x500:
/usr/bin/magick montage /path/stamp003.png \
-bordercolor None -border 2 -duplicate 3 -tile 4x3 -background None -geometry +10+15 miff:- | \
/usr/bin/magick /path/loyalty-card-botox_9991001.jpg -resize 500x -set option:offset "%[fx:h/2]" \
\( - -resize 480x%[offset] -bordercolor none -alpha set -background none -rotate -0 \) -gravity North -geometry -0+%[offset]+15 -composite \
\( -size 420x100 -background none -fill white -font "./lib/hand2.ttf" -gravity center label:"Name" \) -gravity North -geometry +0+110 -composite \
-quality 80 /path/1557475336_3_loyalty-card-botox_9991001.jpg
1. Sets the stamps to echo for each current value
Code: Select all
/usr/bin/magick montage /path/stamp003.png \
2. Duplicates it X times, based on points, 4 point in this case
Code: Select all
-bordercolor None -border 2 -duplicate 3 -tile 4x3 -background None -geometry +10+15 miff:- | \
3. Gets original loyalty card template with circles to put stamps on, resizes it to 500 pixels wide
Code: Select all
/usr/bin/magick /path/loyalty-card-botox_9991001.jpg -resize 500x -set option:offset "%[fx:h/2]" \
4. This step resizes the duplicated stamp (part 1) of the image, stamp 1-n, to a little smaller than the 500 width of the base image, center aligns to the top and moves it 15 pixels below the fold with offset+15.
Code: Select all
\( - -resize 480x%[offset] -bordercolor none -alpha set -background none -rotate -0 \) -gravity North -geometry -0+%[offset]+15 -composite \
^^ This is where it goes wrong in calculating the width to match the placeholders as in the image. I'm trying to wrap my head around where. Removing the +15 at offset does not solve the problem.
5. Add the Name tag (no issues from here on)
Code: Select all
\( -size 420x100 -background none -fill white -font "./lib/hand2.ttf" -gravity center label:"Name" \) -gravity North -geometry +0+110 -composite \
6. Write final image
Code: Select all
-quality 80 /path/1557475336_3_loyalty-card-botox_9991001.jpg
Can I please get an A for effort in trying to explain, lol. Took ages
Thanks.