Is it possible to render text without X11 installed?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
konstantin
Posts: 50
Joined: 2013-08-07T13:50:31-07:00
Authentication code: 6789

Is it possible to render text without X11 installed?

Post by konstantin »

I have a headless VPS with Arch Linux. I try to render text on to some images with command mogrify and option "label":

Code: Select all

mogrify -path ./splice -verbose  -filter Lanczos -resize 320x240 -fill blue -font /usr/share/fonts/TTF/FreeMono.ttf label:text -splice 1x1 -format bmp image.jpg 
, but all I get are error messages:

Code: Select all

mogrify: no encode delegate for this image format `LABEL' @ error/constitute.c/WriteImage/1166.
and

Code: Select all

mogrify: unable to read font `(null)' @ error/annotate.c/RenderFreetype/1127.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Is it possible to render text without X11 installed?

Post by fmw42 »

I think the issue is your use of label:. I get the same error using label:. However, it works fine for me if I use -annotate or -draw. IM 6.8.9.7 Q16 Mac OSX

label: and caption: are typically for creating a new image (using -size) of text and not for adding text to an existing image.

see
http://www.imagemagick.org/Usage/text/
Post Reply