[gdal-dev] to make black triangle transparent (gdalwarp)

Chaitanya kumar CH chaitanya.ch at gmail.com
Thu Nov 3 06:49:24 EDT 2011


Jan,

The -dstalpha option should have created the alpha band. Check the gdalinfo
output of the destination file TEST.tif

On Thu, Nov 3, 2011 at 3:15 PM, Jan Tappenbeck <tappenbeck at widemann.de>wrote:

>
>
>   hi !
>
> i had transform some tif-files by epsg-code so the images will rotate and
> at the border now some black triangles.
>
> now i want to merge by gdalwarp and i use following command with the
> dstalpha-option:
>
> C:\Program Files (x86)\FWTools2.4.7>gdalwarp -dstalpha[Path]\geotiff\trans_
> **a.tif [Path]OP\geotiff\t
> rans_b.tif [Path]OP\geotiff\TEST.tif
> Creating output file that is 20382P x 10788L.
> Processing input file [Path]OP\geotiff\trans_a.tif.
>
> 0...10...20...30...40...50...**60...70...80...90...100 - done.
> Processing input file [Path]OP\geotiff\trans_b.tif.
>
> 0...10...20...30...40...50...**60...70...80...90...100 - done.
>
>
> here are some image-information:
>
> C:\Program Files (x86)\FWTools2.4.7>gdalinfo [Path]
> OP\geotiff\trans_a.tif
> Driver: GTiff/GeoTIFF
> Files: [Path]OP\geotiff\trans_a.tif
> Size is 10390, 10390
> Coordinate System is:
> PROJCS["DHDN / 3-degree Gauss-Kruger zone 2",
>    GEOGCS["DHDN",
>        DATUM["Deutsches_**Hauptdreiecksnetz",
>            SPHEROID["Bessel 1841",6377397.155,299.**1528128000009,
>                AUTHORITY["EPSG","7004"]],
>            AUTHORITY["EPSG","6314"]],
>        PRIMEM["Greenwich",0],
>        UNIT["degree",0.**0174532925199433],
>        AUTHORITY["EPSG","4314"]],
>    PROJECTION["Transverse_**Mercator"],
>    PARAMETER["latitude_of_origin"**,0],
>    PARAMETER["central_meridian",**6],
>    PARAMETER["scale_factor",1],
>    PARAMETER["false_easting",**2500000],
>    PARAMETER["false_northing",0],
>    UNIT["metre",1,
>        AUTHORITY["EPSG","9001"]],
>    AUTHORITY["EPSG","31466"]]
> Origin = (2601576.178792405400000,**5477422.986974134100000)
> Pixel Size = (0.200049845331526,-0.**200049845331526)
> Metadata:
>  AREA_OR_POINT=Area
> Image Structure Metadata:
>  INTERLEAVE=PIXEL
> Corner Coordinates:
> Upper Left  ( 2601576.179, 5477422.987) (  7d24'1.33"E, 49d25'34.75"N)
> Lower Left  ( 2601576.179, 5475344.469) (  7d23'59.41"E, 49d24'27.48"N)
> Upper Right ( 2603654.697, 5477422.987) (  7d25'44.45"E, 49d25'33.49"N)
> Lower Right ( 2603654.697, 5475344.469) (  7d25'42.50"E, 49d24'26.22"N)
> Center      ( 2602615.438, 5476383.728) (  7d24'51.92"E, 49d25'0.49"N)
> Band 1 Block=10390x1 Type=Byte, ColorInterp=Red
> Band 2 Block=10390x1 Type=Byte, ColorInterp=Green
> Band 3 Block=10390x1 Type=Byte, ColorInterp=Blue
>
> could someone tell me how to make the black triangel transparenzy ?
>
> when i move the mousemarker over the black triangle in the OpenEV-Viewer
> in the statusline 0,0,0 will show.
>
> regards Jan :-)
>
> FWTools2.4.7 in use by win7
>
> ______________________________**_________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/gdal-dev<http://lists.osgeo.org/mailman/listinfo/gdal-dev>
>



-- 
Best regards,
Chaitanya kumar CH.

+91-9494447584
17.2416N 80.1426E
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20111103/3533ff9f/attachment.html


More information about the gdal-dev mailing list