Those ImageMagick commands should work fine for IM v6, or IM v7 if installed “with legacy commands”.
I recommend not using “composite” for anything. That is a very old tool, long deprecated. Instead, use “convert … -composite”, with the two input images in the opposite order. That way, a sequence of IM commands can be readily squished into a single command.