AWARE [SYSTEMS]
AWare Systems, , Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
June 2008

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



New Datamatrix section



Valid HTML 4.01!



Thread

2008.06.17 10:49 "ascii to tiff conversion", by C R Granger
2008.06.17 12:10 "Re: ascii to tiff conversion", by Andrey Kiselev
2008.06.18 10:55 "Re: ascii to tiff conversion", by Gerben Vos
2008.06.18 13:36 "Re: ascii to tiff conversion", by <jcupitt@gmail.com>
2008.06.17 12:15 "Re: ascii to tiff conversion", by <jcupitt@gmail.com>

2008.06.18 10:55 "Re: ascii to tiff conversion", by Gerben Vos

C R Granger wrote:

> Hello - I have a need to create TIFF files from plain ascii
> text.

I'm not 100% sure what you mean, but I'll assume you want to
create an image consisting of text displayed using some kind of
font.

Off the top of my head, I can think of three ways; there are
probably many more:

1) Create a PNG image using the GD library and convert the
resulting PNG to TIFF.

2) Create a PBM image using pbmtext and convert the resulting
PBM to TIFF using pnmtotiff.

3) Write a program that uses GD to draw the text into an image
buffer and then use libtiff to write a TIFF from that buffer.
You may have to delve a bit into the GD internals to find out
how to make this work. Or rip out the character-drawing code
out of pbmtext and do the same with that.

I'm pretty sure that programs like ImageMagick and
GraphicsMagick can do this too. The "montage" program with the
"-draw" option looks promising. They can create TIFF directly.

GD: http://www.libgd.org/
pbmtext, pnmtotiff: http://netpbm.sourceforge.net/

					Gerben Vos.