Annotate filename without extension on Windows
Posted: 2014-07-31T08:56:50-07:00
I've been reading documentation, StackOverflow, and these forums for a while now yet I fail to do something as simple as annotating the filename without the extension on Windows. I'm using ImageMagick-6.8.9-6-Q16-x64-dll.exe Windows binary release from the official website. Here's some related information which doesn't seem to work on my machine:
https://stackoverflow.com/questions/410 ... or-similar
http://www.imagemagick.org/Usage/windows/#filenames
http://www.imagemagick.org/Usage/annotating/
Apparently %1 is the filename with extension on Windows. %~n1 is supposed to be the filename without the extension. Neither variable works for me. I've also tried %f, %filename, %~1, and $filename with and without quotes. Nothing works.
Here's what I've tried. This works, I get a small black "test" word at the bottom of the image, as expected. Using convert instead of mogrify with proper input/output files has the exact same effect.
This doesn't work. Nothing is overlaid.
This doesn't work. Nothing is overlaid.
https://stackoverflow.com/questions/410 ... or-similar
http://www.imagemagick.org/Usage/windows/#filenames
http://www.imagemagick.org/Usage/annotating/
Apparently %1 is the filename with extension on Windows. %~n1 is supposed to be the filename without the extension. Neither variable works for me. I've also tried %f, %filename, %~1, and $filename with and without quotes. Nothing works.
Here's what I've tried. This works, I get a small black "test" word at the bottom of the image, as expected. Using convert instead of mogrify with proper input/output files has the exact same effect.
Code: Select all
mogrify -gravity south -annotate 0 "test" *.png
Code: Select all
mogrify -gravity south -annotate 0 "%1" *.png
Code: Select all
mogrify -gravity south -annotate 0 "%~n1" *.png