2004.06.10 08:21 "[Tiff] raw2tiff", by Vipin

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

Hi,

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. So I checked the .bmp files property and obtained the height and 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

Andrey V. Kiselev
Home phone: +7 812 5274898 ICQ# 26871517