ahmet, One likely reason for the dark image is that your viewer is assuming a range of 0-65535 for the alpha values. Check the histogram of the output image. In the histogram for the second band, there should be a bunch of 0 valued pixels and 255 valued pixels. Please provide a small sample image if the problem persists.
2011/2/6 ahmet temiz <ahmettemi...@gmail.com> > hello > > I want to make nodata areas transparent. > > here is what I did: > > 1. > $gdalinfo -mm -noct duy_cat1.tif | grep -i 'nodata' > NoData Value=65535 > > 2. > gdalwarp -srcnodata 65535 -dstalpha duy_cat1.tif duy_cat14.tif > > But, duy_cat14.tif looks full black > > here is info of outputfile(duy_cat14.tif): > ~~~~~~~~~~ > Driver: GTiff/GeoTIFF > Files: duy_cat14.tif > Size is 4677, 5527 > Coordinate System is: > PROJCS["UTM Zone 36, Northern Hemisphere", > GEOGCS[, > DATUM["unknown", > SPHEROID["unnamed",6378388,297.000000000005]], > PRIMEM["Greenwich",0], > UNIT["degree",0.0174532925199433]], > PROJECTION["Transverse_Mercator"], > PARAMETER["latitude_of_origin",0], > PARAMETER["central_meridian",33], > PARAMETER["scale_factor",0.9996], > PARAMETER["false_easting",500000], > PARAMETER["false_northing",0], > UNIT["metre",1, > AUTHORITY["EPSG","9001"]]] > Origin = (437192.936421879974660,4649982.939232329837978) > Pixel Size = (20.004039786776190,-20.004039786776190) > Metadata: > AREA_OR_POINT=Area > Image Structure Metadata: > INTERLEAVE=PIXEL > Corner Coordinates: > Upper Left ( 437192.936, 4649982.939) ( 32d14'30.03"E, 41d59'55.01"N) > Lower Left ( 437192.936, 4539420.611) ( 32d15'11.54"E, 41d 0'10.24"N) > Upper Right ( 530751.831, 4649982.939) ( 33d22'16.70"E, 42d 0'1.87"N) > Lower Right ( 530751.831, 4539420.611) ( 33d21'56.38"E, 41d 0'16.87"N) > Center ( 483972.383, 4594701.775) ( 32d48'28.68"E, 41d30'10.99"N) > Band 1 Block=4677x1 Type=UInt16, ColorInterp=Palette > Computed Min/Max=0.000,65449.000 > Color Table (RGB with 65536 entries) > Band 2 Block=4677x1 Type=UInt16, ColorInterp=Alpha > Computed Min/Max=0.000,255.000 > ~~~~~~~~~~~ > > could you tell me where the problem is ? > > regards > -- > Ahmet Temiz > Jeoloji Müh. > Planlama ve Zarar Azaltma Dairesi Başkanlığı > Bilgi ve CBS grubu > Eskişehir Yolu 10. km. > Lodumlu / Ankara > Tel : 0 312 2872680 / 1535 > _______________________________________________ > gdal-dev mailing list > gdal-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/gdal-dev > -- Best regards, Chaitanya kumar CH. /tʃaɪθənjə/ /kʊmɑr/ +91-9494447584 17.2416N 80.1426E
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev