Totally new to this ; want filename on the image as a reference
tried
convert x.png -font Aerial -pointsize 30 -draw "gravity northwest fill black text
0,12 'abcdefg' " xy.png
this writes title "abcdefg" onto file, but is there a way to put the filename title on the image rather than type it and modify the actual file rather than a copy (x.png - xy.png)
lots of files to do in a batch file
tried %f but it does not like it
filename on an image
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: filename on an image
if you want your image file to be abcdefg.png
str="abcdefg"
convert x.png -font Aerial -pointsize 30 -draw "gravity northwest fill black text
0,12 $str " $str.png
str="abcdefg"
convert x.png -font Aerial -pointsize 30 -draw "gravity northwest fill black text
0,12 $str " $str.png
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: filename on an image
Don't use -draw use -annotate and use the string %f
For example
If you simply want the filename UNDER the image, you can use montage
See IM examples, Montage
http://www.imagemagick.org/Usage/montage/
For many other lableing methods: below, above, or on top of the image; using methods that will work with any image: light, dark, caotic; then look at
IM Examples, Annotating Images
http://www.imagemagick.org/Usage/annotating/
For example
Code: Select all
convert x.png -font Aerial -pointsize 30 -gravity NorthWest -fill black \
-annotate 0,12 '%f' xy.png
Code: Select all
montage -label '%f' x.png \
-font Arial -pointsize 30 \
-geometry +0+0 -background silver xy.png
http://www.imagemagick.org/Usage/montage/
For many other lableing methods: below, above, or on top of the image; using methods that will work with any image: light, dark, caotic; then look at
IM Examples, Annotating Images
http://www.imagemagick.org/Usage/annotating/
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: filename on an image
thanks all
have many files and wanted to write the filename (very long) on each at upper left corner hence the need to use %f
thanks all
have many files and wanted to write the filename (very long) on each at upper left corner hence the need to use %f
thanks all