
Thread
2008.06.17 12:15 "Re: [Tiff] ascii to tiff conversion", by John
2008/6/17 C R Granger <crg@usmd.edu>:
Hello - I have a need to create TIFF files from plain ascii text. I would appreciate it if someone could point me in the right direction here. Thanks in advance for any and all assistance.
PPM is pretty much plain ascii text. You could write a PPM file then use netpbm or similar to convert to tiff.
For example:
----
P3
#im_vips2ppm - Tue Jun 17 13:12:26 2008
3 3
255
170 135 105 100 69 38 150 121 89
175 138 111 102 66 40 155 121 93
162 122 97 107 70 44 131 94 68
------
This is a 3x3 pixel image, where each pixel is 8-bit RGB. The "255" is the image's maximum value (always 255 for 8-bit data).
John