        d=$f
        printf -v formatted_number "%09d" $j
        convert \( $a $c +append \) \
                \( $b $d +append \) \
                -background none -append ../tiles16/$formatted_number.png
        j=$(expr $j + 1)
    fi
    i=$(expr $i + 1)
done
