[CALUG] adding simple text to images
Ken Jackson
linux at kenjackson.us
Wed Mar 9 22:34:34 EST 2011
If you have the ImageMagick package installed, you can use the 'convert'
command:
convert -gravity SouthWest -annotate +10+10 "Some Text" input.jpeg
output.jpeg
There's also the GraphicsMagick package, which spun off of the other:
gm convert -gravity SouthWest -draw 'text +10+10 "Some Text"' \
-font <full path of .ttf file> input.jpeg output.jpeg
I had to specify the full path for gm to work.
Each tool has a million switches to alter the result.
The nice thing about the command-line approach is it's inherently
scriptable.
Once you get a working script, you can convert a million files in one go.
-Ken
On 03/09/2011 03:55 PM, Walt Smith wrote:
> hi,
>
> how can I add some simple text to an image, either photos
> or a bmp ( that I created years ago with some windows
> program ) ?? The images open OK in any viewer....
>
> I want to clear a rectangular area, and paste in text.
>
> I have
> eye of gnome
> evince
> gthumb
> showphoto
> digikam
> gimp
>
> I can't get gimp to simply put in text...errrr, I can,
> but it won't actually paste... .. multiple
> undos get rid of the text I tried to insert.
> I have multiple select rectangles
> open and other misc stuff that won't go away.
>
>
> digikam doesn't seem to have any simple editor.
> And was a PITA - took an hour to find that "config"
> was the place to simply add a directory from...thats crazy.
>
> showphoto can add text, but can't eliminate the bits in a selected area.
> I need to clear a selected area before adding text.
> And when I try to add text, the window size becomes greatly
> reduced and I can't see what I'm doing.
>
> suggestions ??
>
> Walt......
More information about the CALUG
mailing list