Good command-line but Batch conversion not working?
Posted: 2019-06-06T00:55:05-07:00
Hey
I have this command that works and does exactly what I need. But I noticed that when I try to convert it to files automatically (I wrote a GUI for this purpose) a problem arises.
My command looks as follows.
When it executes this command using CMD everything works fine.
However, when I use my program or a bat file with this command (I made a test to rule out a malfunction of my program), I get this message
Pasting this command directly in the DOS console causes the SourceFile.tif file to be processed correctly and no error message appears. Why?
I have this command that works and does exactly what I need. But I noticed that when I try to convert it to files automatically (I wrote a GUI for this purpose) a problem arises.
My command looks as follows.
Code: Select all
magick.exe -density 400 "C:\SourceFile.tif"[0] -alpha remove -sample 3500x3500">" -background #000000 "watermark.tiff" -alpha off -resize %[fx:t?u.w*0.35:u.w]x -append -sample 3500x3500">" -quality 75 "C:\TargetFile.jpg"
However, when I use my program or a bat file with this command (I made a test to rule out a malfunction of my program), I get this message
Code: Select all
magick.exe: InvalidArgument '-resize' 't? u.w * 0.35: u.w]x' at CLI arg 13 @ error / operation.c / CLISimpleOperatorImage / 3170.