O WOW!! That is very comprehensive. Thank you so much for taking the time to help me out here. You really know your way around command line and IM. This is friggin awesome. Thank you so muchfmw42 wrote: ↑2018-10-03T16:13:33-07:00 In IM 7 on Unix, this seems to do what I think you want.
Code: Select all
WxH=`magick stars.jpg -format "%wx%h" info:` ww=`echo "$WxH" | cut -dx -f1` hh=`echo "$WxH" | cut -dx -f2` centx=`magick xc: -format "%[fx:round($ww/2)]" info:` xx=$((centx)) yy=0 i=0 echo "$hh; $ww; $centx; $xx; $yy;" magick stars.jpg result.png while [ $xx -lt $ww -a $yy -lt $hh ]; do echo "$xx; $yy;" magick result.png \( cat.png +repage -resize 50% \) -gravity northwest -geometry +${xx}+${yy} -compose over -composite result.png echo "" i=$((i+1)) xx=`magick xc: -format "%[fx:$i%2==1?($xx-100):($xx+100)]" info:` yy=$((yy+100)) done magick result.png stars_cat3.jpg rm -f result.png
Tile smaller image over a background with offsets?
Re: Tile smaller image over a background with offsets?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Tile smaller image over a background with offsets?
I wrote:
But since you are constraining your positioning width-wise already, the width test could be removed so that the command is just on the height.
Code: Select all
while [ $xx -lt $ww -a $yy -lt $hh ]; do
Code: Select all
while [ $yy -lt $hh ]; do