Martin,

You could scale the actual values into 'float' values between 0 and 255.
This way you can still have the resolution. Conversion to 8-bit will be
easier.

Use GDALRasterBand::GetOffset() and GDALRasterBand::GetScale() along with
GDALRasterBand::SetOffset() and GDALRasterBand::SetScale()
Docs at http://gdal.org/classGDALRasterBand.html describe how to use these.

On Tue, Aug 10, 2010 at 4:32 PM, Andrew Brooks <a...@sat.dundee.ac.uk> wrote:

> On Tue, 10 Aug 2010 11:46:00 +0100, Martin Raspaud <martin.rasp...@smhi.se>
> wrote:
>
>> We have a satellite image in black and white, which show IR brightness
>> temperatures. The data is scaled between 0 and 255 for viewing, and this
>> is
>> packed in a geotiff file
>>
>> Now some users would like to have the true value of the brightness
>> temperature
>> embedded in the file also.
>>
>
> Maybe you can simulate something close by putting a scale and offset (slope
> and intercept) into the geotiff so you still display 8-bit values but a
> decent
> image viewer will also calculate the true values and give a pixel readout
> of
> the true value under the cursor. I say simulate because 8 bits may not give
> sufficient resolution.
>
> Andrew
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
Best regards,
Chaitanya kumar CH.
/tʃaɪθənjə/ /kʊmɑr/
+91-9494447584
17.2416N 80.1426E
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to