Page 1 of 1

Execute Command and ImageMagick

Posted: Fri Sep 06, 2019 3:41 pm
by numnational
Hi all, sorry i'm starting with Execute Command and ImageMagick.

Here is my request.

I have 2 jpg file, 1 file for the Left on file for the Right (R & L). I want to have only one jpg file with the 2 pages, a montage of them.

I use ImageMagick on my local computer with this command on the Terminal and it work like i want : montage -geometry +0,1 '*.jpg' FinalMontage.jpg

See my example here :
https://www.dropbox.com/s/fsdhlmr0u5ek3 ... 1.png?dl=0


When i try to do this on the Switch server it doesn't work...

Here is my argument on the Execute command tools :

Execution mode : Concurent
Command or path : D:/Program Files/ImageMagick-7.0.8-Q16/magick.exe
Arguments : montage -geometry +0,1 "%1" "%2"
Output : File at pat
Copy input job : No
Output extension : Automatic
Fail if exit code is : Disregard exit code

Dont understand how i must change to work to have my final montage.

ImageMagick is correctly installed beacause i make another tools just to test and it work : convert -resize 5% "%1" "%2"

If you have a idea... Thanks.

Re: Execute Command and ImageMagick

Posted: Fri Sep 06, 2019 7:23 pm
by jan_suhr
You probably have to create a .BAT-file to run that in imageMagick.
Then you tell Execute Command to run that .BAT-file.

You can use my app "Execute Command Friend" to easily create the .BAT-file and use Switch variables in a very easy way.

https://www.enfocus.com/en/appstore/pro ... and-friend

Re: Execute Command and ImageMagick

Posted: Wed Sep 11, 2019 5:07 pm
by numnational
Thanks for your answer Jan, but i'm not enought ok with script or .bat file... don't understand the rule to crate my job... :roll:

Re: Execute Command and ImageMagick

Posted: Wed Sep 11, 2019 6:09 pm
by Arthur
Try to modify your arguments for %1 & %2 with fixed paths and switch arguments if needs be.

Re: Execute Command and ImageMagick

Posted: Wed Sep 11, 2019 9:28 pm
by jan_suhr
Your .BAT could be something like this. I haven't tried it myself but it gives a clue on what you should try.

Code: Select all

set inputfile=%1
set outputfile=%2
magick.exe montage -geometry +0,1 %inputfile %outputfile
You could try the .BAT-file with CMD.EXE and change the file variables to real paths and test if it will run.

Re: Execute Command and ImageMagick

Posted: Fri Oct 04, 2019 3:31 pm
by numnational
Hi here is my final command, working perfectly thanks to Enfocus Support.


montage -geometry +0,1 "%1\[Job.NestedName:Index='2',After=' ']" "%1\[Job.NestedName:Index='3',After=' ']" "%2"

Re: Execute Command and ImageMagick

Posted: Fri Nov 15, 2019 12:13 pm
by ChritianK
Have a similar issue with montage and to made contact sheet with several images :

This command I test in a .bat file works successfully :
"C:\Program Files\ImageMagick\magick.exe" montage -units PixelsPerInch "path\TEST\*.jpg" -tile 3x2 -geometry 827x1772+0+0 -density 300 "path\TEST\result\contact_sheet.jpg"

- Made a flow with Assemble Job in order to have a folder with all my images in it to made the contact sheet.

Then I try this Execute command :
Type Execute command
Description
Execution mode Serialized
Command or path C:/Program Files/ImageMagick/magick.exe
Arguments montage "%1"-units PixelsPerInch -tile 3x2 -geometry 827x1772+0+0 -density 300 "%2"
Output Result in folder
Copy input job Yes
Fail if exit code is Nonzero
Fail if stdout contains
Fail if stderr contains

But it failed, have this :

"2019-11-15 11:56:00","error","Execute command","CONTACT_SHEET","contact sheet","07MXT","planche","Job ''_07MXT_planche'' was moved from folder ''C:/Users/Administrateur/AppData/Roaming/Enfocus/Switch Server/backing/CONTACT_SHEET/automanaged/Folder 51'' to the problem jobs folder. Reason: see previous log message(s)"
"2019-11-15 11:56:00","error","Execute command","CONTACT_SHEET","contact sheet","07MXT","planche","Job failed because outcode is nonzero, outcode = [1]"
"2019-11-15 11:56:00","debug","Execute command","CONTACT_SHEET","contact sheet","07MXT","planche","stderr: montage: UnableToOpenConfigureFile `magic.xml'' @ warning/configure.c/GetConfigureOptions/714.; montage: UnableToOpenBlob ''C:\Users\Administrateur\AppData\Roaming\Enfocus\Switch Server\temp\169\ScriptElement\696\12\planche'': Permission denied @ error/blob.c/OpenBlob/3489.; montage: UnableToOpenConfigureFile `delegates.xml'' @ warning/configure.c/GetConfigureOptions/714.; montage: UnableToOpenBlob ''C:\Users\Administrateur\AppData\Roaming\Enfocus\Switch Server\temp\169\ScriptElement\696\12\planche'': Permission denied @ error/blob.c/OpenBlob/3489.; montage: NoDecodeDelegateForThisImageFormat `'' @ error/constitute.c/ReadImage/556.; montage: MissingAnImageFilename `C:\Users\Administrateur\AppData\Roaming\Enfocus\Switch Server\temp\169\ScriptElement\696\10\ExecuteComandResult\planche.jpg'' @ error/montage.c/MontageImageCommand/1777. ยป

It seem permission denied issue or is there another problem I didn't see ?

Thx in advance if anybody have ideas :-)

Re: Execute Command and ImageMagick

Posted: Fri Nov 15, 2019 12:47 pm
by jan_suhr
Have you tried this:

Code: Select all

Arguments montage -units PixelsPerInch "%1" -tile 3x2 -geometry 827x1772+0+0 -density 300 "%2"

Re: Execute Command and ImageMagick

Posted: Fri Nov 15, 2019 2:13 pm
by ChritianK
Thanks for answering, I try it yes

Code: Select all

montage -units PixelsPerInch "%1" -tile 3x2 -geometry 827x1772+0+0 -density 300 "%2"
but have the same error....

stderr: montage: UnableToOpenConfigureFile `magic.xml' @ warning/configure.c/GetConfigureOptions/714.; montage: UnableToOpenBlob 'C:\Users\Administrateur\AppData\Roaming\Enfocus\Switch Server\temp\169\ScriptElement\696\15\planche': Permission denied @ error/blob.c/OpenBlob/3489.; montage: UnableToOpenConfigureFile `delegates.xml' @ warning/configure.c/GetConfigureOptions/714.; montage: UnableToOpenBlob 'C:\Users\Administrateur\AppData\Roaming\Enfocus\Switch Server\temp\169\ScriptElement\696\15\planche': Permission denied @ error/blob.c/OpenBlob/3489.; montage: NoDecodeDelegateForThisImageFormat `' @ error/constitute.c/ReadImage/556.; montage: MissingAnImageFilename `C:\Users\Administrateur\AppData\Roaming\Enfocus\Switch Server\temp\169\ScriptElement\696\13\ExecuteComandResult\planche.jpg' @ error/montage.c/MontageImageCommand/1777.

Re: Execute Command and ImageMagick

Posted: Mon Nov 18, 2019 3:55 pm
by ChritianK
Find solution with help from support, that give me the way to understand what's wrong ! 8-)