for testing, I use imagemagick (the most current version of portable windows) to get text for the image. so I type the following:
convert -font Arial -pointsize 22 -fill black -draw "text 0,0 'TESTTEXT'" test.jpg
but I keep getting this error:
convert.exe: no images defined `test.jpg' @ error/convert.c/ConvertImageCommand/3127.
Can someone tell me why?
Hi
Try adding canvas and specifying the size with -size 200x100 xc:#ff0000
-size 200x100 xc:#ff0000
convert -size 200x100 xc:#ff0000 \ -font Arial -pointsize 22 \ -fill black -gravity center \ -draw "text 0,0 'TESTTEXT'" test.jpg
PS I also added -gravity center to center the text inside the output image
-gravity center
I had this problem because the 32-bit and 64-bit versions of ImageMagick were installed on my system. Removing the latter allowed it.
manpage says:
convert [input-option] input-file [output-option] output-file
So just add the output file:
convert -font Arial -pointsize 22 -fill black -draw "text 0,0 'TESTTEXT'" test.jpg test-out.jpg