[Gdal-dev] Re: scanned maps for mosaicking

Andrey Kiselev dron at ak4719.spb.edu
Tue Jun 7 13:37:29 EDT 2005


On Tue, Jun 07, 2005 at 11:58:22AM +0000, Juan Cicuéndez wrote:
> > The simplest solution is to convert all your scans in the 24-bit RGB
> > format. You can do that with the tiff2rgba utility from the libtiff
> > package. Be ready that resulting images will be larger than original
> > ones, but not too much if you will use compression.
> 
> I tried to convert the imagery from normal tiff with colour table to
> RGB tiff with tiff2rgba. Somehow I obtain 4-banded files. Should it
> not be 3 bands instead? Is this normal?

Yes, that is normal (default) behaviour of the tiff2rgba utility. You
need the -n switch to disable the forth channel generation. The
following is taken from the tiff2rgba manual:

       -n     Drop  the alpha component from the output file, producing
	      a pure RGB file.  Currently this does not work if the -b
	      flag  is  also in effect.


> Besides my program used to includ a line 
> fileInfoArr[i] = new FileInfo(filename, oTargetSRS, temp_dir);
> 
> that fails now with the RGB tiff files; this might be related to my
> previous comment.

Sorry, but I didn't understand what that line does. Could you describe
your problem in more details?

Best regards,
Andrey


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



More information about the Gdal-dev mailing list