Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
convert main.jpg \( mask.jpg -colorspace gray -alpha off \) \ -compose copy-opacity -composite new.png
convert: unable to open image ` -compose': No such file or directory @ error/blob.c/OpenBlob/2709.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
convert: unable to open image `copy-opacity': No such file or directory @ error/blob.c/OpenBlob/2709.
convert: no decode delegate for this image format `' @ error/constitute.c/ReadImage/501.
I get a new.png exported. But it looks exactly like the mask.jpg
convert main.jpg mask.jpg -alpha off -compose copy-opacity -composite new.png
If on Windows, the new line character is ^ rather than \. Also Windows does not need to escape the parenthesis and escape is ^. I assume above that you are not on Windows.