Help on writing a text to gif converter
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Help on writing a text to gif converter




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Help on writing a text to gif converter  
Andrew Falanga


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-21-04 05:34 PM

I've run in to a brick wall, so to speak, with finding a portable way to
make gif files from plain text.  I need something portable, either a C
program or some sort of script.

I've spent considerable time searching on the Internet for a text to gif
converter.  I found 2 such PERL scripts.  One I'm still trying to figure
out, and the other was primarily gears for converting specially formated
mathematical equations formated in LaTeX.

Because of the issues I've been having, I'm considering writing my own
utility and was hoping that someone here might have used some OpenSource
gif libraries for me to draw on.  Ideally, I'd like a C program that I
can compile on the respective platforms.  (At this point, HP-UX and linux).

Are there any libs out there?  Perhaps some already installed on RedHat?
I don't care, I'm just frustrated with what I've found on the next
thus far.

---------------------------------------------
Andrew R. Falanga (a non-HP employee)
Hewlett-Packard Company
11311 Chinden Blvd.
Boise, Idaho
---------------------------------------------
Please note: The e-mail address is purposely
mangled.  I do not wish my account at HP to
become a spam haven.





[ Post a follow-up to this message ]



    Re: Help on writing a text to gif converter  
Jem Berkes


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-21-04 06:36 PM

> I've run in to a brick wall, so to speak, with finding a portable way
> to make gif files from plain text.  I need something portable, either
> a C program or some sort of script.

You sure you want to make GIF files? Are you ready to pay your licensing to
Unisys?

Scrap GIF and make PNG files instead. You can use libpng:
http://www.libpng.org/pub/png/libpng.html

--
Jem Berkes
http://www.sysdesign.ca/





[ Post a follow-up to this message ]



    Re: Help on writing a text to gif converter  
Jens.Toerring@physik.fu-berlin.de


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-21-04 07:35 PM

Andrew Falanga <falandrew@hp.com> wrote:
> I've run in to a brick wall, so to speak, with finding a portable way to
> make gif files from plain text.  I need something portable, either a C
> program or some sort of script.

> I've spent considerable time searching on the Internet for a text to gif
> converter.  I found 2 such PERL scripts.  One I'm still trying to figure
> out, and the other was primarily gears for converting specially formated
> mathematical equations formated in LaTeX.

> Because of the issues I've been having, I'm considering writing my own
> utility and was hoping that someone here might have used some OpenSource
> gif libraries for me to draw on.  Ideally, I'd like a C program that I
> can compile on the respective platforms.  (At this point, HP-UX and linux).[/vbcol
]
[vbcol=seagreen]
> Are there any libs out there?  Perhaps some already installed on RedHat?
>   I don't care, I'm just frustrated with what I've found on the next
> thus far.

Unfortunately your specifications are much too unspecific. Text is
just a bunch of characters without any specific formatting, without
any information about what font to use etc. If you're not looking for
something fancy perhaps the simplest solution would be (if it's only
a short text, maybe fitting on a single line) to convert the text to
simple Postscript and then use one of the available converters (i.e.
ImageMagick). Something like that could possibly done with a rather
short script (mostly consisting of the text for the Postscript wrapper).

Regards, Jens
--
\   Jens Thoms Toerring  ___  Jens.Toerring@physik.fu-berlin.de
\__________________________  http://www.toerring.de





[ Post a follow-up to this message ]



    Re: Help on writing a text to gif converter  
Andrew Falanga


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-21-04 08:35 PM

>
> Unfortunately your specifications are much too unspecific. Text is
> just a bunch of characters without any specific formatting, without
> any information about what font to use etc. If you're not looking for
> something fancy perhaps the simplest solution would be (if it's only
> a short text, maybe fitting on a single line) to convert the text to
> simple Postscript and then use one of the available converters (i.e.
> ImageMagick). Something like that could possibly done with a rather
> short script (mostly consisting of the text for the Postscript wrapper).
>
>                                          Regards, Jens

This approach sounds good.  Where can I learn about creating postscript
files?  (Litterally, I've never created a postscript file.)

--

---------------------------------------------
Andrew R. Falanga (a non-HP employee)
Hewlett-Packard Company
11311 Chinden Blvd.
Boise, Idaho
---------------------------------------------
Please note: The e-mail address is purposely
mangled.  I do not wish my account at HP to
become a spam haven.





[ Post a follow-up to this message ]



    Re: Help on writing a text to gif converter  
Victor Wagner


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-21-04 08:35 PM

Andrew Falanga <falandrew@hp.com> wrote:
:>
:> Unfortunately your specifications are much too unspecific. Text is
:> just a bunch of characters without any specific formatting, without
:> any information about what font to use etc. If you're not looking for
:> something fancy perhaps the simplest solution would be (if it's only
:> a short text, maybe fitting on a single line) to convert the text to
:> simple Postscript and then use one of the available converters (i.e.
:> ImageMagick). Something like that could possibly done with a rather
:> short script (mostly consisting of the text for the Postscript wrapper).
:>
:>                                          Regards, Jens

: This approach sounds good.  Where can I learn about creating postscript
: files?  (Litterally, I've never created a postscript file.)


Postscript is just yet another programming language. There is book
"Thinking in Postscript", available on the Net in the PDF format. It
should be enough.

I have an example of such approach on http://45.free.net/cgi-bin/mkgif
(not sure that all fonts I put in the menu of this script some years ago
still available on my system).

But if you don't need fancy formatting, you don't need
postscript.

There is netpbm suite of utilities, which contain ascii2pgm program,

Also take look to the gd graphics library.

--
MS-DOS, you can't live with it, you can live without it.
-- from Lars Wirzenius' .sig





[ Post a follow-up to this message ]



    Re: Help on writing a text to gif converter  
Stefaan A Eeckels


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-22-04 11:35 AM

On Wed, 21 Apr 2004 12:46:20 -0600
Andrew Falanga <falandrew@hp.com> wrote:

> This approach sounds good.  Where can I learn about creating postscript
> files?  (Litterally, I've never created a postscript file.)
>
For the purpose of converting a text file (or text messages) into
GIF or another graphics format, you can use a2ps
<http://www.inf.enst.fr/~demaille/a2ps/> to convert your text file
to PostScript, and then Aysushi Saito's ps2png.pl
<http://www.hpl.hp.com/personal/Yasushi_Saito/pstopng.pl>
(yep, a colleague) to turn it into a PNG image.
Converting to GIF is equally easy, if you _must_ use GIF
(google for pstogif).

Take care,

--
Stefaan
--
"What is stated clearly conceives easily."  -- Inspired sales droid





[ Post a follow-up to this message ]



    Re: Help on writing a text to gif converter  
Glen


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-22-04 04:36 PM

Hi Andrew,

Have you tried the SNG program?

-- SNIP
SNG (Scriptable Network Graphics) is a minilanguage designed
specifically to represent the entire contents of a PNG (Portable
Network Graphics) file in an editable form. Thus, SNGs representing
elaborate graphics images and ancillary chunk data can be readily
generated or modified using only text tools.

SNG is implemented by a compiler/decompiler called sng that losslessly
translates between SNG and PNG.
-- SNIP

You might also look at any2png and gif2png.

See the following web sites for info about the programs mentioned
above. Gluck.
http://www.libpng.org/pub/png/
http://sng.sourceforge.net/

Cheers,
Glen.

Andrew Falanga <falandrew@hp.com> wrote in message news:<4086a3a4$1@usenet01.boi.hp.com>...[
vbcol=seagreen]
> I've run in to a brick wall, so to speak, with finding a portable way to
> make gif files from plain text.  I need something portable, either a C
> program or some sort of script.
>
> I've spent considerable time searching on the Internet for a text to gif
> converter.  I found 2 such PERL scripts.  One I'm still trying to figure
> out, and the other was primarily gears for converting specially formated
> mathematical equations formated in LaTeX.
>
> Because of the issues I've been having, I'm considering writing my own
> utility and was hoping that someone here might have used some OpenSource
> gif libraries for me to draw on.  Ideally, I'd like a C program that I
> can compile on the respective platforms.  (At this point, HP-UX and linux)
.
>
> Are there any libs out there?  Perhaps some already installed on RedHat?
>   I don't care, I'm just frustrated with what I've found on the next
> thus far.
>
> ---------------------------------------------
> Andrew R. Falanga (a non-HP employee)
> Hewlett-Packard Company
> 11311 Chinden Blvd.
> Boise, Idaho
> ---------------------------------------------
> Please note: The e-mail address is purposely
> mangled.  I do not wish my account at HP to
> become a spam haven.[/vbcol]





[ Post a follow-up to this message ]



    Re: Help on writing a text to gif converter  
William Park


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-22-04 10:34 PM

Andrew Falanga <falandrew@hp.com> wrote:
> I've run in to a brick wall, so to speak, with finding a portable way to
> make gif files from plain text.  I need something portable, either a C
> program or some sort of script.
>
> I've spent considerable time searching on the Internet for a text to gif
> converter.  I found 2 such PERL scripts.  One I'm still trying to figure
> out, and the other was primarily gears for converting specially formated
> mathematical equations formated in LaTeX.

If it can put math in an image, then it can also put text.  Main thing
is that there are different font styles and font sizes to choose from.
This is true even on console terminal.

man ImageMagick
man convert

--
William Park, Open Geometry Consulting, <opengeometry@yahoo.ca>
Linux solution/training/migration, Thin-client





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:34 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register