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
October 2007

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

2007.10.30 02:27 "Simple code to write Tiff images from Raw data", by Richard Nolde
2007.10.31 00:01 "Re: Rookie question", by Leonardo Serni
2007.11.15 02:19 "Re: Simple code to write Tiff images from Raw data", by Ron Croonenberg
2007.11.15 04:37 "Re: Simple code to write Tiff images from Raw data", by Frank Warmerdam
2007.11.15 15:36 "Re: Simple code to write Tiff images from Raw data", by Ron Croonenberg
2007.11.15 15:45 "Re: Simple code to write Tiff images from Raw data", by Frank Warmerdam
2007.11.15 11:42 "Re: Simple code to write Tiff images from Raw data", by Jason Tillett
2007.11.15 14:42 "Re: Simple code to write Tiff images from Raw data", by Ron Croonenberg

2007.10.30 02:27 "Simple code to write Tiff images from Raw data", by Richard Nolde

Ron,
  If you have your data in memory as an series of 2 dimensional arrays, 
one array for each 2D image, you can map them to a series of individual 
pages in a multipage TIFF file. The size, type, and range of each 
element and the ordering of the data in your array will determine your 
TIFF parameters, eg grayscale, palette, RGB, additional channels, etc. 
First, you should download and read the TIFF spec to get an idea which 
tags you will need to setup to properly describe your data and what the 
options are for each tag. After that, you might look at the source code 
for the tiffcrop utility, which has code to write out buffers of data 
from memory to TIFF files. There are also a few very simplistic sample 
programs available on the IBM developerworks site that illustrate the 
basic concepts. I don't have the URL handy but you can probably find it 
with Google. These samples are for bilevel or grayscale data, but you 
should be able to use them to move on to color images.

For simulation data, you may have to scale your values to a range that 
is conducive to viewing and/or remove outliers if your intent is to 
analyze the data visually rather than statistically. If you data are 
produced as floating point data, you may want to convert them to 
integers so that a wider variety of available TIFF readers can handle 
them. You will also have to decide whether to write you image data as 
RGB,RGB,RGB...... (PLANAR_CONFIG_CONTIGUOUS) or RRR....,GGG.....,BBB.... 
(PLANAR_CONFIG_SEPARATE).

Richard Nolde
> Hello,
>
> I am new to  libTiff. I am looking for a way to create TIF image files 
> (or any other graphics format) from "raw" simulation data. (basically it 
> is 3-d data projected on a 2-D plane.  What it comes down to is that I 
> have a bunch of "pixels", a discrete coordinate (that translates to a 
> pixel in an image) and RGB values. (I basically just want to create an 
> image by doing something like "this pixel has these RGB values" and 
> "stick them in an image file.
>
> It probably can be done with libTiff, right ?  are there any examples 
> that I can take a look at ?
>
> thanks,
>
> Ron
>
>