Jan,<br><br>Your original image has a color table with RGBA values. Since it includes the alpha channel, you can just modify the color table to set the entry for 0 to (0,0,0,0). With a 0 value for alpha, the pixels with 0 value will be transparent.<br>
<br>But you can set it using the VRT format. This method has been discussed in this list earlier[1]. However, you have to reapply the whole table's entries.<br><br>It might be easier to change the color table using a desktop GIS application.<br>
<br>[1]: <a href="http://lists.osgeo.org/pipermail/gdal-dev/2011-May/028854.html">http://lists.osgeo.org/pipermail/gdal-dev/2011-May/028854.html</a><br><br><div class="gmail_quote">On Mon, Nov 28, 2011 at 4:40 PM, Jan Tappenbeck <span dir="ltr"><<a href="mailto:tappenbeck@widemann.de" target="_blank">tappenbeck@widemann.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>
<br>
HI !<br>
<br>
after my problems to transform rasterimage now i have a problem to make the white background tranparency.<br>
<br>
After the translation the new image had following status:<br>
<br>
C:\Program Files (x86)\FWTools2.4.7>gdalinfo "D:\City\raster\gas\500\twf_<u></u>chec<br>
k\baseline_etrs.tif"<br>
Driver: GTiff/GeoTIFF<br>
Files: D:\City\raster\gas\500\twf_<u></u>check\baseline_etrs.tif<br>
Size is 16568, 9564<br>
Coordinate System is:<br>
PROJCS["ETRS89 / UTM zone 32N",<br>
GEOGCS["ETRS89",<br>
DATUM["European_Terrestrial_<u></u>Reference_System_1989",<br>
SPHEROID["GRS 1980",6378137,298.<u></u>2572221010002,<br>
AUTHORITY["EPSG","7019"]],<br>
AUTHORITY["EPSG","6258"]],<br>
PRIMEM["Greenwich",0],<br>
UNIT["degree",0.<u></u>0174532925199433],<br>
AUTHORITY["EPSG","4258"]],<br>
PROJECTION["Transverse_<u></u>Mercator"],<br>
PARAMETER["latitude_of_origin"<u></u>,0],<br>
PARAMETER["central_meridian",<u></u>9],<br>
PARAMETER["scale_factor",0.<u></u>9996],<br>
PARAMETER["false_easting",<u></u>500000],<br>
PARAMETER["false_northing",0],<br>
UNIT["metre",1,<br>
AUTHORITY["EPSG","9001"]],<br>
AUTHORITY["EPSG","25832"]]<br>
Origin = (380297.397497169380000,<u></u>5745229.623735004100000)<br>
Pixel Size = (0.032091644585721,-0.<u></u>032091644585721)<br>
Metadata:<br>
AREA_OR_POINT=Area<br>
Image Structure Metadata:<br>
INTERLEAVE=BAND<br>
Corner Coordinates:<br>
Upper Left ( 380297.397, 5745229.624) ( 7d15'44.21"E, 51d50'42.10"N)<br>
Lower Left ( 380297.397, 5744922.699) ( 7d15'44.59"E, 51d50'32.17"N)<br>
Upper Right ( 380829.092, 5745229.624) ( 7d16'11.98"E, 51d50'42.51"N)<br>
Lower Right ( 380829.092, 5744922.699) ( 7d16'12.36"E, 51d50'32.58"N)<br>
Center ( 380563.245, 5745076.161) ( 7d15'58.29"E, 51d50'37.34"N)<br>
Band 1 Block=16568x1 Type=Byte, ColorInterp=Palette<br>
Color Table (RGB with 256 entries)<br>
0: 255,255,255,255<br>
1: 0,0,0,255<br>
2: 0,0,0,255<br>
3: 0,0,0,255<br>
4: 0,0,0,255<br>
5: 0,0,0,255<br>
6: 0,0,0,255<br>
7: 0,0,0,255<br>
8: 0,0,0,255<br>
9: 0,0,0,255<br>
10: 0,0,0,255<br>
11: 0,0,0,255<br>
12: 0,0,0,255<br>
13: 0,0,0,255<br>
14: 0,0,0,255<br>
....<br>
<br>
i try to make the image transparency by<br>
<br>
C:\Program Files (x86)\FWTools2.4.7>gdalwarp -srcnodata 0 -dstalpha "D:\City\<br>
raster\gas\500\twf_check\<u></u>baseline_etrs.tif" "D:\City\raster\gas\500\twf_<u></u>check<br>
\baseline_etrs_t.tif"<br>
Copying color table from D:\City\raster\gas\500\twf_<u></u>check\baseline_etrs.tif t<br>
o new file.<br>
Creating output file that is 16568P x 9564L.<br>
ERROR 6: SetColorTable() not supported for multi-sample TIFF files.<br>
Processing input file D:\City\raster\gas\500\twf_<u></u>check\baseline_etrs.tif.<br>
<br>
but there comes the message "ERROR 6: SetColorTable() not supported for multi-sample TIFF files." and the result image is only 1 Color !!!!!!!!<br>
<br>
the status now is<br>
C:\Program Files (x86)\FWTools2.4.7>gdalinfo "D:\City\raster\gas\500\twf_<u></u>chec<br>
k\baseline_etrs_t.tif"<br>
Driver: GTiff/GeoTIFF<br>
Files: D:\City\raster\gas\500\twf_<u></u>check\baseline_etrs_t.tif<br>
Size is 16568, 9564<br>
Coordinate System is:<br>
PROJCS["ETRS89 / UTM zone 32N",<br>
GEOGCS["ETRS89",<br>
DATUM["European_Terrestrial_<u></u>Reference_System_1989",<br>
SPHEROID["GRS 1980",6378137,298.<u></u>2572221010002,<br>
AUTHORITY["EPSG","7019"]],<br>
AUTHORITY["EPSG","6258"]],<br>
PRIMEM["Greenwich",0],<br>
UNIT["degree",0.<u></u>0174532925199433],<br>
AUTHORITY["EPSG","4258"]],<br>
PROJECTION["Transverse_<u></u>Mercator"],<br>
PARAMETER["latitude_of_origin"<u></u>,0],<br>
PARAMETER["central_meridian",<u></u>9],<br>
PARAMETER["scale_factor",0.<u></u>9996],<br>
PARAMETER["false_easting",<u></u>500000],<br>
PARAMETER["false_northing",0],<br>
UNIT["metre",1,<br>
AUTHORITY["EPSG","9001"]],<br>
AUTHORITY["EPSG","25832"]]<br>
Origin = (380297.397497169380000,<u></u>5745229.623735004100000)<br>
Pixel Size = (0.032091644585733,-0.<u></u>032091644585733)<br>
Metadata:<br>
AREA_OR_POINT=Area<br>
Image Structure Metadata:<br>
INTERLEAVE=PIXEL<br>
Corner Coordinates:<br>
Upper Left ( 380297.397, 5745229.624) ( 7d15'44.21"E, 51d50'42.10"N)<br>
Lower Left ( 380297.397, 5744922.699) ( 7d15'44.59"E, 51d50'32.17"N)<br>
Upper Right ( 380829.092, 5745229.624) ( 7d16'11.98"E, 51d50'42.51"N)<br>
Lower Right ( 380829.092, 5744922.699) ( 7d16'12.36"E, 51d50'32.58"N)<br>
Center ( 380563.245, 5745076.161) ( 7d15'58.29"E, 51d50'37.34"N)<br>
Band 1 Block=16568x1 Type=Byte, ColorInterp=Gray<br>
Mask Flags: PER_DATASET ALPHA<br>
Band 2 Block=16568x1 Type=Byte, ColorInterp=Alpha<br>
<br>
Can anyone help me ??<br>
<br>
reagards Jan :-)<br>
<br>
<br>
<br>
<br>
______________________________<u></u>_________________<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/<u></u>mailman/listinfo/gdal-dev</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br><br><a href="tel:%2B91-9494447584" value="+919494447584" target="_blank">+91-9494447584</a><br>17.2416N 80.1426E<br>