On lundi 27 août 2018 09:17:32 CEST GUIMMARA, Sébastien (External) [FR] wrote: > Hi all, > > I am creating a VRT that translate from a 16bit dataset to a 8bit. Here is > the raster band : > > <VRTRasterBand dataType="Byte" band="1"> > <ComplexSource> > ... > <Exponent>0.75</Exponent> > <SrcMin>0</SrcMin> > <SrcMax>65535</SrcMax> > <DstMin>0</DstMin> > <DstMax>255</DstMax> > <SourceProperties DataType="UInt16"/> > </ComplexSource> > </VRTRasterBand> > > However, gdal_info 2.2 tells me that this VRT has DataType=Byte (OK), but > the min/max are still 0/65535 instead of 0/255. > > How is it possible ?
An inappropriate optimization that didn't take into account exponential scaling. Fixed per https://github.com/OSGeo/gdal/commit/c2b188a49baef70e4e05614be14caaa520341302 Even -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev