How do I convert text file to image for use with overlay

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?".
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How do I convert text file to image for use with overlay

Post by snibgo »

"-interline-spacing" can be used with negative values to squish the text, but I still think something in your text file is creating extra spacing.
snibgo's IM pages: im.snibgo.com
whenry

Re: How do I convert text file to image for use with overlay

Post by whenry »

You are likely correct but I have not figured it out. I think I will go with interline spacing but first I have to figure out how to install the foll thing. I tired using the RPM for Linux but got errors. Now i guess i'll have to compile the fool thing from the source.
whenry

Re: How do I convert text file to image for use with overlay

Post by whenry »

Sigh..... Ignorant I am but now enlightened (although I still have an oddity)

It turns out the text file I was using was one I had email to myself as an attachment, played with in windows and then copied back up to the Linux server. The darned thing has CR and LF because I had opened it in a windows editor. When I stripped the extra one out via DOS2UNIX, viola the mysterious extra lines disappeared.

There is still something I do not understand. I get an error when trying to use some of the newer options like kerning. I will not need them it now appears but I do not understand . I originally thought it was a problem because i was running an old version but now I have upgraded and still it does not work. Even more strange, I have a test machine that is a literal clone of this one and with the new version that machine has no problem with kerning.

Code: Select all

 identify -version
Version: ImageMagick 6.6.0-10 2010-03-26 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features:

cat test-image.txt | convert -font Courier  -kerning  text:- test-image.png
convert: unrecognized option `-kerning'.
One further note. I now find that "kerning" is possible when I am root but not when I am myself. I assume that it is a permissions thing.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How do I convert text file to image for use with overlay

Post by magick »

Your version of convert is different than your version of identify. Type
  • convert -version
Does it say 6.6.0-10?
whenry

Re: How do I convert text file to image for use with overlay

Post by whenry »

Yes it is the same version. you are seeing screen shots from before and after I installed the newest version.

Thank you all for you help I think I have it now.
Post Reply