Page 1 of 1

All convert settings 'ending with a colon' are not working

Posted: 2017-01-24T10:46:44-07:00
by ACorner
Hi all,

I'm trying to add 4 text lines to a given graphic file. Everything works fine as long as I use the -draw "text .." operator.
But as the length of the fourth line is unknown the word wrap or auto size funktion of e.g. a "caption:" would be great to use.
All examples from the ImageMagick ' Text to Image Handling' page are working flawless on a pc with "ImageMagick 6.7.7-10 2016-11-29 Q16" installed, on another pc (and this is the important one) with a newer version "ImageMagick 6.8.9-9 Q16 x86_64 2015-01-05" all examples containig a generator (?) or in my words containing a setting followed by a colon (label:, caption:, xc:, pango: etc.) are not working.

The simple command (found here in another thread):

Code: Select all

convert -size 1656x250 label:"what what what what what what what what"  test.jpg
brings up the following error messages:

Code: Select all

convert: UnableToOpenBlob `what what what what what what what what': No such file or directory @ error/blob.c/OpenBlob/2709.
convert: NoDecodeDelegateForThisImageFormat `LABEL' @ error/constitute.c/ReadImage/501.
convert: NoImagesDefined `test.jpg' @ error/convert.c/ConvertImageCommand/3210.

All other examples bring similar messages.

Does anybody kow where this aversion to a colon may come from?
I have to say that bot pc's are running linux, the second is a HTPC that comes with BusyBox as shell.

Thanks in advance
Alex

Re: All convert settings 'ending with a colon' are not working

Posted: 2017-01-24T10:54:49-07:00
by snibgo
ACorner wrote:convert: NoDecodeDelegateForThisImageFormat `LABEL' @ error/constitute.c/ReadImage/501.
This suggests a bad build. How about:

Code: Select all

convert rose: x.png
What does "convert -list format" show. Does it include "LABEL"?

Re: All convert settings 'ending with a colon' are not working

Posted: 2017-01-24T12:04:42-07:00
by ACorner
Hi,

thank's for your quick response.
snibgo wrote: 2017-01-24T10:54:49-07:00 How about:
convert rose: x.png
Does nothing. Have to press ctrl-c.
What does "convert -list format" show. Does it include "LABEL"?

Code: Select all

convert -list format
   Format  Module    Mode  Description
-------------------------------------------------------------------------------

* native blob support
r read support
w write support
+ support for multiple images
Not that much ;)
So would you call this a 'bad' build or just a 'minimum' build to save occupied space. What would be necessary to have at least "caption:" running?
Thank's again
Alex

Re: All convert settings 'ending with a colon' are not working

Posted: 2017-01-24T12:12:44-07:00
by snibgo
Ha! Yes, a "minimum" build, that can't do anything. What is the platform? If you built it yourself, what does configure.log say? Or did you install from a binary distribution? Or did you simply copy files from another machine, without installing it at all?

Re: All convert settings 'ending with a colon' are not working

Posted: 2017-01-24T13:02:00-07:00
by ACorner
The basic operations are working. As I wrote it is possible to use the -draw funtion.
No, I didn't built it myself, it's part of the minidvblinux which is, the name says it all, supposed to be small.
Can you tell me which build options should be used to have the needed functions working?

Re: All convert settings 'ending with a colon' are not working

Posted: 2017-01-24T13:21:06-07:00
by snibgo
The default "configure" settings will give access to "rose:", "caption:" etc. Perhaps some "-without" settings remove these. "./configure --help" lists all the options.

Another test you might try:

Code: Select all

convert -debug all rose: x.png
The debugging output may illuminate the problem: it can't find XML files, or whatever.

Re: All convert settings 'ending with a colon' are not working

Posted: 2017-01-24T13:40:12-07:00
by ACorner
Okay then I have to convince the maintainer to build IM without -without options ;)
Thank you for you help
Alex

Re: All convert settings 'ending with a colon' are not working

Posted: 2017-01-24T17:08:11-07:00
by fmw42
Did your maintainer install from source or from binary? If from source, then you likely have no or minimal delegate libraries for handling PNG, TIFF, JPG, etc. You would need to build all the needed delegates before compiling IM. See http://www.imagemagick.org/download/delegates/

You can see what delegates are installed from

convert -version

for current IM systems or

convert -list configure

for older IM systems

Re: All convert settings 'ending with a colon' are not working

Posted: 2017-01-25T02:53:09-07:00
by ACorner
Hi Fred,

I guess they install from source. The only files found in modules-Q16 are coders for jpeg and png.

Delegates: bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib

But I can't figure out which additional delegates would be necessary.
My current (simple) commandline looks like this:

Code: Select all

convert infile.png -fill yellow -gravity west -font Sans -pointsize 20 -draw "text 20,0 'Line1'" -draw "text 20,20 'Line2'"  -draw "font-size 15 text 20,40 'Line3'" outfile.png 

Where Line1-3 are variables (changed some expressions here for better understanding). The width of Line3 may extend the picture width, that's why I want to use caption or pango or whatever here (don't know if you can mix -draw text and caption, but that's another question)

Re: All convert settings 'ending with a colon' are not working

Posted: 2017-01-25T11:52:13-07:00
by fmw42
Delegates: bzlib djvu fftw fontconfig freetype jbig jng jpeg lcms lqr ltdl lzma openexr pangocairo png tiff wmf x xml zlib
This shows that you have all the needed delegates. So I am not sure what is wrong. Your command looks fine. Do you have the font Sans and does IM know it by name. Alternately, use -font path2/Sans.ttf or whatever the actual font file is.

On my Mac OSX IM 6.9.7.5 Q16 system, I only have Open-Sans, but this command works fine:

Code: Select all

convert -size 200x200 xc:black  -fill yellow -gravity west -font Open-Sans -pointsize 20 -draw "text 20,0 'Line1'" -draw "text 20,20 'Line2'"  -draw "font-size 15 text 20,40 'Line3'" outfile.png 
Both your systems 6.7.7-10 and 6.8.9-9 are rather old. Perhaps you need an upgrade. Also check that you have a current version of libpng.

Re: All convert settings 'ending with a colon' are not working

Posted: 2017-01-26T02:15:19-07:00
by ACorner
I guess you got me wrong. The command I posted was an example of that pattern that works for me. I have no problems with fonts and I have no problems im- or exporting PNG files.
Problems arise as soon as I replace -draw with caption: label: pango: etc. Even xc: instead of -fill results in an error message.

Re: All convert settings 'ending with a colon' are not working

Posted: 2017-01-26T10:09:48-07:00
by fmw42
Sorry for my misunderstanding. Your commmand

Code: Select all

convert -size 1656x250 label:"what what what what what what what what"  test.jpg
works fine for me on IM 6.9.7.5 Q16 Mac OSX and on IM 6.8.9.6 Q16. Sorry, I cannot go back to 6.7.7.10.

I do not know what the problem might be.

My only suggestion would be to upgrade IM and your delegates.

Re: All convert settings 'ending with a colon' are not working

Posted: 2017-01-27T04:08:37-07:00
by ACorner
I suspect that the maintainer stripped all modules as snibgo suggested. So I'll knock on his door first ;)
Thank's for your help.