Re: Tile smaller image over a background with offsets?
Posted: 2018-10-04T08:30:46-07:00
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