converting a text file to image

dwahli at gmail.com dwahli at gmail.com
Fri Jun 20 12:52:46 CEST 2008


On Jun 20, 9:15 am, jimgardener <jimgarde... at gmail.com> wrote:
> i am looking for python code to convert a textfile(.txt) to an
> image(preferrably Tiff).I believe it involves some scanning  and
> conversion using some font table and probably compression using
> huffman encoding..is there an open source code doing this?can someone
> give a pointer?
> jim

Do you have a text file (toto.txt) and you want to render it as an
image ?
Never done that but my first thought is to use PIL (http://
www.pythonware.com/products/pil/).

Examples:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/483756
http://blog.foozia.com/blog/2007/nov/21/rendering-text-image-using-django-template-tag



More information about the Python-list mailing list