AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2004.05.17 12:05 "[Tiff] Tiff compression and bits per sample", by
2004.05.17 13:03 "Re: [Tiff] Tiff compression and bits per sample", by Frank Warmerdam
2004.05.17 13:59 "Re: [Tiff] Tiff compression and bits per sample", by Andrey Kiselev
2004.05.17 19:58 "RE: [Tiff] Compression", by Peter Smith
2004.05.17 13:12 "[Tiff] Compression", by Dlpnet
2004.05.17 14:24 "Re: [Tiff] Compression", by Andrey Kiselev
2004.05.18 14:04 "Re: [Tiff] Compression", by Dlpnet
2004.05.18 17:58 "Re: [Tiff] Compression", by Andrey Kiselev
2004.06.15 07:53 "RE: [Tiff] raw2tiff", by
2004.06.15 06:51 "Re: [Tiff] raw2tiff", by Andrey Kiselev

2004.06.15 06:51 "Re: [Tiff] raw2tiff", by Andrey Kiselev

Hi,

On Thu, Jun 10, 2004 at 01:51:58PM +0530, vipin.aravind@wipro.com wrote: > I am not able to use raw2tiff properly on windows 2000.

> I feel I am missing something.

The first of all: what libtiff version do you using?

> I have the below usage:-
>
> raw2tiff [inputfile] [outputfile]

In this case raw2tiff will guess image geometry based on simple statistics. This method works in the most cases, but sometimes it may produce wrong results.

> When I do this, it is taking the length and width worngly.

> the .bmp files property and obtained the height and So I checked

 > width and now I send it as

> raw2tiff -w width -l length input.bmp output.tif.

But BMP is not a simple raw file. It contains a header and every line is padded to the word boundary. So if you want to guess geometry you should give size of the header to raw2tiff (option -H). Usually it is 54 bytes long, but it depends on BMP type. Depending on BMP type it can also have a palette written after the header, it should be skipped too. Finally you should supply the right number of channels (it may be 1, 3 and 4, depending on BMP type).

So raw2tiff is not the right tool to convert such files. But CVS version of libtiff contains the new utility bmp2tiff which is aimed to convert Windows BMP files into TIFFs.

 --
 Andrey V. Kiselev

Home phone: +7 812 5274898 ICQ# 26871517