No one has a solution?
Thank you.
On Mon, May 31, 2010 at 10:42 AM, Pietro Panzeri <
[email protected]> wrote:
> Hi all,
>
> I'm writing a plugin using GDAL C library to allow the user to create a
> grayscale GeoTiff with transparency.
>
> I've used the following code to init the raster:
>
> Driver = GDALGetDriverByName("GTiff");
>
> papszOptions = CSLSetNameValue(papszOptions, "COMPRESS", "LZW");
>
> Dataset = GDALCreate(Driver, SrcFilename, XSize, YSize, 2, GDT_Byte,
> papszOptions);
>
> Band1 = GDALGetRasterBand(Dataset, 1);
> GDALSetRasterColorInterpretation(Band1, GCI_GrayIndex);
>
> Band2 = GDALGetRasterBand(Dataset, 2);
> GDALSetRasterColorInterpretation(Band2, GCI_AlphaBand);
>
> ...
> Init the two bands
> ...
>
>
> The result is a correct grayscale image but without transparency.
>
> Can someone point me a way to create a grayscale GeoTiff with a
> transparency?
>
> Thank you very much.
>
> Pietro
>
>
> --
> Pietro Panzeri
>
> Software Development Manager
>
> Tele-Rilevamento Europa - T.R.E. srl
> Via Vittoria Colonna, 7
> 20149 Milano – Italia
> Tel.: +39.02.4343.121 - Fax: +39.02.4343.1230
> [email protected] - www.treuropa.com
>
--
Pietro Panzeri
Software Development Manager
Tele-Rilevamento Europa - T.R.E. srl
Via Vittoria Colonna, 7
20149 Milano – Italia
Tel.: +39.02.4343.121 - Fax: +39.02.4343.1230
[email protected] - www.treuropa.com
_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user