Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would like to convert a lot of text to jpeg images.
I tried it from the command line using convert:
echo "This is some text to test if imagemagick is useable for converting text to image" | convert -page 500x360+0+0 -font Helvetica -style Normal -background none -undercolor white -fill black -pointsize 22 text:- +repage -background white -flatten text_box_trimmed.png
I supposed that the above command would wrap long text lines, but it did not. Long lines were truncated, instead.
I also tried it manually, by first converting the text to pdf by OpenOffice, then converting pdf to jpg by imagemagick.
This was also prevented by convert: it inserted a large blank area above the text, when converting it to jpeg. It seemed as if convert did not like the landscape-oriented pdf page, so it made a square-like image of it by inserting the blank area.
Is there a way to efficiently convert text to jpeg at the present immature stage of softwares on linux?
Edit:
Finally I succeded with the "inferior" method through pdf (using the -trim option to remoe the blank area). But the quality of the text on the resulting image is really bad this way. It just cannot be compared to the method when the conversion is made from text directly.
I've never done this, but if the whole problem with imagemagick is that it doesn't wrap lines, you can do that previously with an external tool, can't you?
Doesn't OpenOffice Draw allow saving documents as jpeg? You might have to go by way of Writer, if you could get the text composed there in the form you want.
Last edited by thorkelljarl; 04-03-2009 at 07:06 PM.
I've never done this, but if the whole problem with imagemagick is that it doesn't wrap lines, you can do that previously with an external tool, can't you?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.