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

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
January 2012

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
Archive maintained by AWare Systems



New Datamatrix section



Valid HTML 4.01!



Thread

2012.01.04 10:54 "reading rgb values from 16 bits tif images", by Martin Alegre
2012.01.04 12:37 "Re: reading rgb values from 16 bits tif images", by <mikk@go2.pl>
2012.01.04 14:07 "Re: reading rgb values from 16 bits tif images", by Olivier Paquet
2012.01.04 14:55 "Re: reading rgb values from 16 bits tif images", by Martin Alegre
2012.01.04 15:08 "Re: reading rgb values from 16 bits tif images", by Olivier Paquet
2012.01.04 14:42 "Re: reading rgb values from 16 bits tif images", by Bob Friesenhahn
2012.01.04 15:02 "Re: reading rgb values from 16 bits tif images", by Martin Alegre
2012.01.04 15:24 "Re: reading rgb values from 16 bits tif images", by Bob Friesenhahn
2012.01.05 09:12 "Re: reading rgb values from 16 bits tif images", by Martin Alegre

2012.01.04 15:24 "Re: reading rgb values from 16 bits tif images", by Bob Friesenhahn

On Wed, 4 Jan 2012, Martin Alegre wrote:

> Hi Bob,
> 
> Thanks for your suggestions on the high-level libraries. At the beginning,
> I was thniking to use Magick++
> for my application, but it seemed to me that it was going to be more
> faster to integrate the libtiff
> library into my code, also due to time constraints. If you have any
> illustrations on how to use libtiff
> for 16bits images, it will be great or if you also have some good
> webpointers where I could get more
> information? I found a very illustrative webpage on how to use libtiff
> (http://bitmiracle.com/libtiff/help/samples.aspx), but it was mainly for
> C#, and I'm currently working
> with C++.

It makes a huge difference if you plan to accept arbitrary TIFF files 
written by some other software or if you only plan to accept a very 
limited set of TIFF formats.  If the former, then you should expect to 
do quite a lot of development (e.g. weeks, months).

You can use TIFFReadRGBAStrip() to access strip-oriented files or 
TIFFReadTile() for tile-oriented files.  These interfaces provide 
"raw" decompressed + native-endian-swapped pixel sample data.  The 
swapping to native endian is only done if the sample bits are evenly 
divisible by 8 (e.g. 16-bit "short" is swapped to native format).

Bob
-- 
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/