Hi folks, <br><br>I have a problem trying to create RGBs with the gdal_merge.py utility...<br><br>Mainly I have some images that I have extracted from HDF4 SDSs and processed in TIFF format using ImageMagick...<br><br>Now a sample image as the following gdalinfo output:<br>
<br><b>mattia@mattia-laptop:~/Desktop/rgb$ gdalinfo t2.tif <br>Driver: GTiff/GeoTIFF<br>Files: t2.tif<br>Size is 2708, 9340<br>Coordinate System is `'<br>Metadata:<br> TIFFTAG_DOCUMENTNAME=AMOD02HKM20070104021601_0_1_band_2_out.tif<br>
TIFFTAG_SOFTWARE=ImageMagick 6.3.8 02/18/08 Q16 <a href="http://www.imagemagick.org">http://www.imagemagick.org</a><br> TIFFTAG_XRESOLUTION=72<br> TIFFTAG_YRESOLUTION=72<br> TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)<br>
Image Structure Metadata:<br> INTERLEAVE=BAND<br>Corner Coordinates:<br>Upper Left ( 0.0, 0.0)<br>Lower Left ( 0.0, 9340.0)<br>Upper Right ( 2708.0, 0.0)<br>Lower Right ( 2708.0, 9340.0)<br>Center ( 1354.0, 4670.0)<br>
Band 1 Block=2708x1 Type=UInt16, ColorInterp=Gray</b><br><br>The file size (for the three images I am trying to merge) is about 50MB..<br>As you can see its a 16 bit image..<br><br>if I run something like:<br><br><b> gdal_merge.py -separate t1.tif t2.tif t3.tif -o out.tif</b><br>
<br>The output image out.tif is still a greyscale where 2 of the bands are somehow "not recognized"...<br>The gdalinfo on the output tif is:<br><br><b>Driver: GTiff/GeoTIFF<br>Files: out.tif<br>Size is 2708, 9340<br>
Coordinate System is `'<br>Image Structure Metadata:<br> INTERLEAVE=PIXEL<br>Corner Coordinates:<br>Upper Left ( 0.0, 0.0)<br>Lower Left ( 0.0, 9340.0)<br>Upper Right ( 2708.0, 0.0)<br>Lower Right ( 2708.0, 9340.0)<br>
Center ( 1354.0, 4670.0)<br>Band 1 Block=2708x1 Type=UInt16, ColorInterp=Gray<br>Band 2 Block=2708x1 Type=UInt16, ColorInterp=Undefined<br>Band 3 Block=2708x1 Type=UInt16, ColorInterp=Undefined<br></b><br><br>Does it have to do with the fact that its a 16 bit image and gdal_merge.py doesn't support it? <br>
With the fact that ImageMagick has corrupted something ? <br>Or what exactly is the issue?<br><br>Thanks in advance<br><br><br>-- <br>Mattia<br>