hi,
I am using
$ display --version
Version: ImageMagick 6.8.9-9 Q16 x86_64 2018-09-28 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2014 ImageMagick Studio LLC
Features: DPC Modules OpenMP
Delegates: bzlib cairo djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png rsvg tiff wmf x xml zlib
on 64bit ubuntu OS
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial
My requirement is that
I want to add colored text with white background to bottom of file .
Can this be done using one command rather than creating a separate text image then using append ?
[SOLVED] append colored text to an image
[SOLVED] append colored text to an image
Last edited by manit on 2019-06-24T21:53:28-07:00, edited 1 time in total.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: append colored text to an image
You can do that by splicing white at the bottom, then using -annotate, then splicing a bit more.
or you can use montage.
Here I use the ImageMagick internal image logo: (replace logo: with your image.suffix).
Code: Select all
convert logo: -background white -gravity south -splice 0x20 -fill red -pointsize 18 -annotate +0+0 "testing" -splice 0x5 result.png
Code: Select all
montage -label "testing" logo: -background white -fill red -pointsize 18 -tile x1 -geometry +0+0 result.png
Here I use the ImageMagick internal image logo: (replace logo: with your image.suffix).
- GeeMack
- Posts: 718
- Joined: 2015-12-01T22:09:46-07:00
- Authentication code: 1151
- Location: Central Illinois, USA
Re: append colored text to an image
Within a single command you can create a label with colored text on a white background, and append that label to the bottom of your input image. A command like this should get you started...
Code: Select all
convert input.png -background white -fill red -pointsize 24 label:"Any text." -gravity south -append result.png
Re: append colored text to an image
Geemack,
That works for me .
Can you enclose that text in rectangle before addition so that I have separated rows at bottom of image .
Actually I am pointing a straight line to bottom of image .
That works for me .
Can you enclose that text in rectangle before addition so that I have separated rows at bottom of image .
Actually I am pointing a straight line to bottom of image .
Re: append colored text to an image
That can be done using -border and -bordercolor option .
This thread is solved .
This thread is solved .