Page 1 of 1
Vertical Spacing issue
Posted: 2009-07-16T14:08:12-07:00
by applejax
Hi, I sent this to the Help desk b/c I don't know if it's a bug or not. I have this text file that says something like:
Test
on multiple
lines.
But when the image gets produced it looks like there are extra return lines in there like this:
Test
on multiple
lines.
My command isn't anything complicated so what's up with the vertical spacing? How do you correct this? The commands I used:
convert -pointsize 72 -density 196 txt:test.txt -resample 72 -trim +repage -bordercolor white -border 3 done.png
Note: Changing the font size doesn't do anything either.
Re: Vertical Spacing issue
Posted: 2009-07-17T03:37:01-07:00
by anthony
More than likely your text is a windows text file. that is the end of every line contains a NEWLINE and a RETURN
character. If you can remove one of those characters from the input file. You may also want to remove BOTH characters at the end of the file so that an exta blank line is not generated.
Under UNIX / Linux, or even MacOSX, this is not really a problem as these systems has lots of tools to manipulate text files as a standard part of the system. Things like, "tr", "sed", "perl", etc, etc and may have other more specialized toold to convert windows text files to unix text files (only a NEWLINE at end of each line).
Windows do not have such tools by default
I look at this problem in IM Examples, Text to Image Processing, Multiple Line Labels...
http://www.imagemagick.org/Usage/text/#multi-lines
However it is likely the IM should automatically ignore RETURN characters so prehaps you would like to submit a bug report in the bugs forum. Reference this topic if you want. However that will not help you with your current problem, so you may need to DIY your own text file conversion solution (or search for a utility on the web).
Re: Vertical Spacing issue
Posted: 2009-07-20T16:34:38-07:00
by applejax
I saved it as a unix text document in word pad and still get the same result....you know cuz there are the 2 options to save as text or text (ms-dos). i don't have linux on my machine.
Re: Vertical Spacing issue
Posted: 2009-07-20T18:57:44-07:00
by anthony
Without being able to examine the file I cound not tell you if it is 'return' characters or not that is the problem.