AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
March 2004

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



Valid HTML 4.01!



Thread

2004.03.19 17:50 "txt to tiff", by Soledad Alborno
2004.03.20 08:44 "Re: txt to tiff", by Andrey Kiselev
2004.03.20 14:53 "Re: txt to tiff", by Bob Friesenhahn
2004.03.20 15:18 "Re: txt to tiff", by Joris Van Damme
2004.03.20 15:32 "Re: txt to tiff", by Bob Friesenhahn
2004.03.20 15:44 "Re: txt to tiff", by Joris Van Damme
2004.03.20 15:53 "Re: txt to tiff", by Bob Friesenhahn
2004.03.20 16:18 "Re: txt to tiff", by Joris Van Damme
2004.03.20 16:37 "Re: txt to tiff", by Bob Friesenhahn
2004.03.20 16:53 "Re: txt to tiff", by Joris Van Damme
2004.03.20 16:48 "Re: txt to tiff", by Joris Van Damme
2004.03.20 21:50 "Re: txt to tiff", by Andrey Kiselev
2004.03.20 22:27 "Re: txt to tiff", by Joris Van Damme
2004.03.20 21:43 "Re: txt to tiff", by Andrey Kiselev
2004.03.20 22:50 "Re: txt to tiff", by Joris Van Damme
2004.03.21 05:35 "Re: txt to tiff", by Mark Mcconnell

2004.03.20 15:18 "Re: txt to tiff", by Joris Van Damme

Bob Friesenhahn wrote:
> On Fri, 19 Mar 2004, Soledad Alborno wrote:
> > Hello, I am searching how to convert txt files to tiff files.
>
> The easiest way is to use a tool like 'enscript' to produce Postscript
> from the text, and then use Ghostscript in conjunction with libtiff to
> output a TIFF file.

I beg to differ, Bob. OK, it's easiest *for your*, since you've already setup
all this stuff and learned to use it. Anyone else is in for quite an adventure
doing it this way.

Soledad Alborno wrote:
> Hello, I am searching how to convert txt files to tiff files.

This is a bit of a weird question, I'm not sure if I understand your need... TXT
is a text format, is plain text. TIFF is an image format, is very flexible
multipage raster image. Do you need to render txt to a image raster, and next
store the created image in a TIFF file? Or is your txt some kind of array of
values, as possibly exported by spreadsheets or databases or such, and do you
want to create an image with pixels having those color values? Or something else
alltogether?

For now, I'm going to assume it's rendering you're after. What OS do you use? If
Windows, it's easy to create a DIB, and render the text on it. That should yield
access to a block of memory storing something like scanlines of 8bit grayscale
or 24bit 'true color' RGB. Next, you can set up LibTiff to encode this raster to
a TIFF file.

First step, rendering, is described in your Windows documentation (and I assume
any contemporary operating system has something similar). Search your
documentation for things like CreateDIBSection, DrawText, and that kinda basic
GDI stuff.

Last step, encoding to TIFF, is described in LibTiff documentation. Here's some
additional pointers. First two are URL's to good documentation on how to use
LibTiff. Next two are pointers to the long-term mailing list archive, riddled
with information on TIFF and LibTiff.

http://www.ibm.com/developerworks/linux/library/l-libtiff/
http://www-106.ibm.com/developerworks/linux/library/l-libtiff2/
http://www.remotesensing.org/libtiff/tml/index.html
http://www.awaresystems.be/tiff_mailing_list/index.html



Joris Van Damme
info@awaresystems.be
http://www.awaresystems.be
Download your free TIFF tag viewer for windows here:
http://www.awaresystems.be/imaging/tiff/astifftagviewer.html