[gdal-dev] Is there "--config GDAL_TIFF_INTERNAL_MASK YES" C# equivalent???

Even Rouault even.rouault at spatialys.com
Tue Aug 7 23:33:09 PDT 2018


On mardi 7 août 2018 20:19:58 CEST Dmitriy T. wrote:
> How to use a bunch:
> 
> Dataset image = Gdal.OpenShared(sourceCopy, Access.GA_ReadOnly);
> Gdal.wrapper_GDALTranslate(translatedFile, image, options, null, null);
> 
> to create a JPEG-compressed TIFF with internal mask from a RGBA dataset (in
> C#)?
> 
> I'm interested in the C# equivalent of a call *--config
> GDAL_TIFF_INTERNAL_MASK YES*.
> 

In a previous reply, I missed the fact that --config x y isn't expanded by 
utility-as-a-library-function, but only by the binaries

So you have to call

Gdal.SetConfigOption("GDAL_TIFF_INTERNAL_MASK", "YES")

or set is as an environment variable

before calling

Gdal.wrapper_GDALTranslate()

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list