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.
Execute Command and ImageMagick
Re: Execute Command and ImageMagick
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
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
-
- Member
- Posts: 38
- Joined: Tue Sep 30, 2014 3:28 pm
Re: Execute Command and ImageMagick
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...
Re: Execute Command and ImageMagick
Try to modify your arguments for %1 & %2 with fixed paths and switch arguments if needs be.
Re: Execute Command and ImageMagick
Your .BAT could be something like this. I haven't tried it myself but it gives a clue on what you should try.
You could try the .BAT-file with CMD.EXE and change the file variables to real paths and test if it will run.
Code: Select all
set inputfile=%1
set outputfile=%2
magick.exe montage -geometry +0,1 %inputfile %outputfile
-
- Member
- Posts: 38
- Joined: Tue Sep 30, 2014 3:28 pm
Re: Execute Command and ImageMagick
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"
montage -geometry +0,1 "%1\[Job.NestedName:Index='2',After=' ']" "%1\[Job.NestedName:Index='3',After=' ']" "%2"
Re: Execute Command and ImageMagick
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
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
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
Thanks for answering, I try it yes
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.
Code: Select all
montage -units PixelsPerInch "%1" -tile 3x2 -geometry 827x1772+0+0 -density 300 "%2"
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
Find solution with help from support, that give me the way to understand what's wrong !