ImageMagick and Run Command issue with JPEG

Post Reply
User avatar
valaxedo
Newbie
Posts: 6
Joined: Mon Mar 14, 2011 4:40 pm

ImageMagick and Run Command issue with JPEG

Post by valaxedo »

Hello members!
I'm quite a newbie in these fields, and I'm looking for an explanation about an issue.
My goal is to append two jpeg images into one.

To do so, I installed the Run Command from AppStore using Zsh with the following command:

/opt/homebrew/Cellar/imagemagick/7.1.1-43/bin/magick %%[Job.Path]%/[Job.NestedName:Index="2",Space="trim"] %%/[Job.Path]%%/[Job.NestedName:Index="3",Space="trim"] -append result.jpg

Each time, I receive this error:
Command failed with exit code: "1", Error output: "magick: no decode delegate for this image format `' @ error/constitute.c/ReadImage/746. "

I tested the same function in the Terminal and it worked fine:
svc_masterbrowser@FLO-MAC-107036 ~ % magick /Users/svc_masterbrowser/Desktop/JUSTDANCE_Inlay_SWITCH_1.jpg /Users/svc_masterbrowser/Desktop/JUSTDANCE_Inlay_SWITCH_2.jpg -append TestAppend.jpg

I'm, then, pretty sure that my syntax is not good in Switch.
Would you be able to explain what?

Many thanks
Regards.
Axel
UBISOFT | Axel ROBERT | Senior Manager, Prepress & Quality
freddyp
Advanced member
Posts: 1098
Joined: Thu Feb 09, 2012 3:53 pm

Re: ImageMagick and Run Command issue with JPEG

Post by freddyp »

The paths of the input file and output file that you tested in Terminal did not contain spaces. The paths to the backing folders in Switch will, and I think that is your problem. Place quotes around the paths (because there are already double quotes, I would first try with single quotes):
'%%[Job...."trim"]'
User avatar
valaxedo
Newbie
Posts: 6
Joined: Mon Mar 14, 2011 4:40 pm

Re: ImageMagick and Run Command issue with JPEG

Post by valaxedo »

Hello Freddy!
Thank you for your answer.

I amended it but the result, still an error, is quite different now:
"Command failed with exit code: "1", error ouput: "magick: unable t oopen image. No such file or directory @ error/blob.c/OpenBlob/3596."

It's the same with a double quote. :-(

Best.
UBISOFT | Axel ROBERT | Senior Manager, Prepress & Quality
loicaigon
Advanced member
Posts: 524
Joined: Wed Jul 10, 2013 10:22 am

Re: ImageMagick and Run Command issue with JPEG

Post by loicaigon »

Hi

Have you looked at the log messages what is the command Switch exactly tries to execute?

Image

It's typically a good way to see if your command is well constructed and you can even copy/paste in a terminal to double test local vs Switch.
User avatar
valaxedo
Newbie
Posts: 6
Joined: Mon Mar 14, 2011 4:40 pm

Re: ImageMagick and Run Command issue with JPEG

Post by valaxedo »

Hello Loïc!
How are you?

Thank you for your input.
I already tested the cli magick cmd and it works fine.

But in Switch: Command failed with exit code: "1", Error output: "magick: unable to open image '%%/Users/svc_masterbrowser/Documents/Switch Email Template v2/IN_Magick/_000BG_000BG044%/JUSTDANCE_Inlay_SWITCH_1.jpg': No such file or directory @ error/blob.c/OpenBlob/3596. "

svc_masterbrowser@FLO-MAC-107036 ~ % magick /Users/svc_masterbrowser/Desktop/JUSTDANCE_Inlay_SWITCH_1.jpg /Users/svc_masterbrowser/Desktop/JUSTDANCE_Inlay_SWITCH_2.jpg -append TestAppend.jpg

Weird, no? What did I miss, so far?
Thanks!
UBISOFT | Axel ROBERT | Senior Manager, Prepress & Quality
Post Reply