Re: [gdal-dev] GDAL translate 16 bit to 8 bit

2014-08-22 Thread Cleo Drakos
thanks Hanlie. cleo On Fri, Aug 22, 2014 at 9:01 PM, Hanlie Pretorius < hanlie.pretor...@gmail.com> wrote: > Hi Cleo, > > I used > > -scale 0 4095 0 255 > > The reason for the 4095 is that the images actually use only the first > 12 bits of the 16 bits (according to the documentation) and 2^12

Re: [gdal-dev] GDAL translate 16 bit to 8 bit

2014-08-22 Thread Hanlie Pretorius
Hi Cleo, I used -scale 0 4095 0 255 The reason for the 4095 is that the images actually use only the first 12 bits of the 16 bits (according to the documentation) and 2^12 = 4096. If it was a true 16 bit image I would use 65535 for the 'max from' value. Regards Hanlie 2014-08-22 13:56 MGT+0

Re: [gdal-dev] GDAL translate 16 bit to 8 bit

2014-08-22 Thread Cleo Drakos
hi Hanlie, can you tell me what value you put for -scale to convert into 8 bit? cleo On Fri, Aug 22, 2014 at 7:02 PM, Hanlie Pretorius < hanlie.pretor...@gmail.com> wrote: > Hi Even, > > Yes, I quoted the exact message, but it displays in the QGIS interface. > > I tried gdal_translate with the

Re: [gdal-dev] GDAL translate 16 bit to 8 bit

2014-08-22 Thread Hanlie Pretorius
Hi Even, Yes, I quoted the exact message, but it displays in the QGIS interface. I tried gdal_translate with the -ot and -scale parameters on the multispectral image and that worked much better, thanks. Regards Hanlie 2014-08-21 20:33 MGT+02:00, Even Rouault : > Le jeudi 21 août 2014 08:57:32,

Re: [gdal-dev] GDAL translate 16 bit to 8 bit

2014-08-21 Thread Even Rouault
Le jeudi 21 août 2014 08:57:32, Hanlie Pretorius a écrit : > Hi, > > I'm working with a 16 bit SPOT 6 image that I want to convert from 16 > bit pixel depth to 8 bit pixel depth. I say 16 bit, but if I load the > file into Envi, it reports that uses only 12 bits. However gdalinfo > reports 16 bit

[gdal-dev] GDAL translate 16 bit to 8 bit

2014-08-20 Thread Hanlie Pretorius
Hi, I'm working with a 16 bit SPOT 6 image that I want to convert from 16 bit pixel depth to 8 bit pixel depth. I say 16 bit, but if I load the file into Envi, it reports that uses only 12 bits. However gdalinfo reports 16 bit (see below). I've manage to do so on the multispectral image, but the