I'm currently trying to create an image with a very large number of other images using ImageMagick. Each image has its own crop values, and placement within the larger image. Rather than a large number of read/writes to the output image, I'd like to send the command all at once, but it is far too large to pass via the command line.
I've found references to a seemingly undocumented feature of ImageMagick, scripts. However I can't seem to figure them out. Take this very simple command from the docs:
magick -size 50x50 xc:skyblue an_image.png -composite output.png
This creates a blue square, "pastes" an_image.png
onto it, and saves it as output.png
. However I'm struggling to recreate even this with a script:
script.mgk:
-size 50x50 xc:skyblue an_image.png -composite output.png
command:
magick -script script.mgk
The above outputs the error:
magick: unable to open image 'output.png': No such file or directory @ error/blob.c/OpenBlob/3569.
Trying additional lines yields similar errors. Though if an_image.png
doesn't exist (for example) it will instead print an error saying that that file couldn't be found.
Any help is greatly appreciated!