when submitting a convert command from an executable (created from powerbasic console compiler), as submitted to by exe:
C:\Windows\system32\cmd.exe /c E:\test\imagemagick-portable\convert.exe "E:/test/cars/_001 2018 PORSCHE 911 GT3 (4 L).JPG" -resize 1920x1080 -quality 100 -gravity Northwest -font roboto-light -pointsize 24 -fill black -stroke black -strokewidth 3 -annotate +60+60 "PORSCHE 911 GT3" -fill white -stroke white -strokewidth 1 -annotate +60+60 "PORSCHE 911 GT3" "E:\test\cars1\_001 2018 PORSCHE 911 GT3 (4 L).JPG"
i get error : "convert.exe: MissingAnImageFilename `-annotate' @ error/convert.c/ConvertImageCommand/3277."
if i remove the "C:\Windows\system32\cmd.exe /c " and run the same command the command works as expected
convert version: 7.0.7-2 Q16 x64 2017-09-12 - portable version used
windows 7 sp1 pro 64bit
Many thanks for any assistance,
John
convert.exe: MissingAnImageFilename `-annotate' @ error/convert.c/ConvertImageCommand/3277.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: convert.exe: MissingAnImageFilename `-annotate' @ error/convert.c/ConvertImageCommand/3277.
I suggest you insert "-debug all" as the first operation within convert. Near the top of the output, you will get the tokens as seen by convert, something like this:
This can provide an insight into the problem.
Code: Select all
f:\web\im>cmd /c c:\im\ImageMagick-6.9.5-3-Q16\convert.exe -debug all "/web/im/r.png" "/web/im/r2(c).png"
2017-09-25T04:22:39+01:00 0:00.000 0.000u 6.9.5 Configure convert.exe[1944]: utility.c/ExpandFilenames/940/Configure
Command line: c:\im\ImageMagick-6.9.5-3-Q16\convert.exe {-debug} {all} {/web/im/r.png} {/web/im/r2(c).png}
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: convert.exe: MissingAnImageFilename `-annotate' @ error/convert.c/ConvertImageCommand/3277.
You should replace convert with magick in IM 7 to be sure you are not using legacy Imagemagick commands.
Re: convert.exe: MissingAnImageFilename `-annotate' @ error/convert.c/ConvertImageCommand/3277.
many thanks fmw42 and snibgo i tried both suggestions
using magick.exe produced the same result, albeit with different msg txt
debug all (convert and magick) produced heaps of output, especially when resizing an image, but did not really seem add any helpful information - importantly it pointed at strokewidth as being the filename - 2 parameters less than the original error annotate
i believe the error is that when the cmd with prefix "C:\Windows\system32\cmd.exe /c " is passed from the pb executable there is a limit to the number of parameters being passed to the cmd process - hence the earlier parameter being highlighted
therefore this isn't a error in IM but in PB, as the cmds do work when used natively
my original workaround was to create a bat file with the native cmds then execute that from the PB program - this works and it's how i will proceed
again many thanks for your suggestions; i've swiched to use magick (not convert) and the debug all pointed me to the observation re PB
using magick.exe produced the same result, albeit with different msg txt
debug all (convert and magick) produced heaps of output, especially when resizing an image, but did not really seem add any helpful information - importantly it pointed at strokewidth as being the filename - 2 parameters less than the original error annotate
i believe the error is that when the cmd with prefix "C:\Windows\system32\cmd.exe /c " is passed from the pb executable there is a limit to the number of parameters being passed to the cmd process - hence the earlier parameter being highlighted
therefore this isn't a error in IM but in PB, as the cmds do work when used natively
my original workaround was to create a bat file with the native cmds then execute that from the PB program - this works and it's how i will proceed
again many thanks for your suggestions; i've swiched to use magick (not convert) and the debug all pointed me to the observation re PB