Nikos and GDALers:<div><br></div><div>This is CLOSE to what I'm looking to do, but I'm having a hard time getting it working properly. Here's my input dataset gdalinfo dump:</div><div><br></div><div>***</div><div>
<br></div><div><div>Driver: ENVI/ENVI .hdr Labelled</div><div>Files: 10SEP10191223-M2AS-052377832030_01_P003_ps_gs_bl_tc.envi</div><div> 10SEP10191223-M2AS-052377832030_01_P003_ps_gs_bl_tc.hdr</div><div>Size is 42255, 51712</div>
<div>Coordinate System is:</div><div>GEOGCS["WGS 84",</div><div> DATUM["WGS_1984",</div><div> SPHEROID["WGS 84",6378137,298.257223563,</div><div> AUTHORITY["EPSG","7030"]],</div>
<div> TOWGS84[0,0,0,0,0,0,0],</div><div> AUTHORITY["EPSG","6326"]],</div><div> PRIMEM["Greenwich",0,</div><div> AUTHORITY["EPSG","8901"]],</div><div>
UNIT["degree",0.0174532925199433,</div><div> AUTHORITY["EPSG","9108"]],</div><div> AUTHORITY["EPSG","4326"]]</div><div>Origin = (-120.066479999999999,39.271554000000002)</div>
<div>Pixel Size = (0.000004500000005,-0.000004500000005)</div><div>Image Structure Metadata:</div><div> INTERLEAVE=BAND</div><div>Corner Coordinates:</div><div>Upper Left (-120.0664800, 39.2715540) (120d 3'59.33"W, 39d16'17.59"N)</div>
<div>Lower Left (-120.0664800, 39.0388500) (120d 3'59.33"W, 39d 2'19.86"N)</div><div>Upper Right (-119.8763325, 39.2715540) (119d52'34.80"W, 39d16'17.59"N)</div><div>Lower Right (-119.8763325, 39.0388500) (119d52'34.80"W, 39d 2'19.86"N)</div>
<div>Center (-119.9714062, 39.1552020) (119d58'17.06"W, 39d 9'18.73"N)</div><div>Band 1 Block=42255x1 Type=UInt16, ColorInterp=Undefined</div><div>Band 2 Block=42255x1 Type=UInt16, ColorInterp=Undefined</div>
<div>Band 3 Block=42255x1 Type=UInt16, ColorInterp=Undefined</div><div><br></div><div>***</div><div><br></div><div>I need to end up with a Byte TIF image with good color balance from this input. Running rgb2pct.py on this dataset just outputted a "blank" (grey) image. Running gdal_translate -of GTiff -ot Byte -scale [min] [max] worked somewhat, but its near impossible to get this looking right, since the scaling I want to do differs from band to band (e.g. if there any way to use -scale to adjust each band separately)? Alternatively, how would I get rgb2pct.py working on the above image correctly? Thanks!</div>
<div><br></div><div>--j</div><div><br></div><br><div class="gmail_quote">On Wed, Jun 8, 2011 at 4:10 PM, Nikolaos Hatzopoulos <span dir="ltr"><<a href="mailto:nhatzop@gmail.com">nhatzop@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">why you don't try rgb2pct <a href="http://www.gdal.org/rgb2pct.html" target="_blank">http://www.gdal.org/rgb2pct.html</a>?<br>
<br>--Nikos Hatzopoulos<br><br><div class="gmail_quote"><div><div></div><div class="h5">On Wed, Jun 8, 2011 at 2:20 PM, Jonathan Greenberg <span dir="ltr"><<a href="mailto:greenberg@ucdavis.edu" target="_blank">greenberg@ucdavis.edu</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><div><div></div><div class="h5">Folks:<div><br></div><div>I am using a piece of software which is relying on an older version of GDAL that doesn't have the "fix" to deal with > 8 bit geotiffs (it is trying to make a jpeg overlay but can't from a 16 bit image. I think this is the issue: <a href="http://trac.osgeo.org/gdal/wiki/TIFF12BitJPEG" target="_blank">http://trac.osgeo.org/gdal/wiki/TIFF12BitJPEG</a>), but when I do a straight convert (-ot Byte) the output image looks really washed out. Any hints for getting the best quality output from a 16 bit to to an 8 bit conversion of a Geotiff? </div>
<div><br></div><div>--j<br clear="all"><br>-- <br>Jonathan A. Greenberg, PhD<br>Assistant Project Scientist<br>Center for Spatial Technologies and Remote Sensing (CSTARS)<br>Department of Land, Air and Water Resources<br>
University of California, Davis<br>One Shields Avenue<br>Davis, CA 95616<br>Phone: <a href="tel:415-763-5476" value="+14157635476" target="_blank">415-763-5476</a><br>AIM: jgrn307, MSN: <a href="mailto:jgrn307@hotmail.com" target="_blank">jgrn307@hotmail.com</a>, Gchat: jgrn307<br>
<br>
</div>
<br></div></div>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br>
</blockquote></div><br><br clear="all"><br>-- <br>Jonathan A. Greenberg, PhD<br>Assistant Project Scientist<br>Center for Spatial Technologies and Remote Sensing (CSTARS)<br>Department of Land, Air and Water Resources<br>
University of California, Davis<br>One Shields Avenue<br>Davis, CA 95616<br>Phone: 415-763-5476<br>AIM: jgrn307, MSN: <a href="mailto:jgrn307@hotmail.com" target="_blank">jgrn307@hotmail.com</a>, Gchat: jgrn307<br><br>
</div>