Opened 20 years ago

Last modified 19 years ago

#699 closed defect (worksforme)

16-bit image files in TIF and SARCEOS formats can't be displayed properly.

Reported by: davidhopper2003@… Owned by: warmerdam
Priority: high Milestone:
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords:


Dear Sir,
       I am using the GDAL library in Visual C++ 6.0 now. It is really a 
wonderful thing. I am very appreciated for your self-giving contributions. But 
I have met several problems.      

    1) When I used it to read the 16-bit image files in TIF and SARCEOS 
formats, they could not be displayed. Only the grayed screen was showed up.

    2) Does it support read-write of the pure 16-bit data file of short type? A 
few days ago, I added an image driver for this type according to the steps in 
GDAL Driver Implementation Tutorial. It didn¡¯t work at all. But when I added 
the driver for another type image file, it did well. What¡¯s the matter?

    3) I want to debug the library in source code mode , but I can' t find the 
way to achieve it.

    4) I want to create a Visual C++ project file(*. dsw) to rebuild the whole 
library, and I can' t find how to do it yet.

    Please give me some advice. Thanks a lot.



                                                 Yours Sincerely, 

                                                   David Hopper

Change History (2)

comment:1 by warmerdam, 20 years ago

1) Generally speaking GDAL reads 16 bit data just fine into a short
buffer, if the RasterIO() is invoked with approriate parameters. 
However, if you read 16bit data into an 8bit buffer, by default GDAL
will truncate all values larger than 255 to 255.  Can you give details
on your situation?

2) GDAL does support writing "pure 16bit data" in GeoTIFF files, and via
other properly constructed drivers that support 16bit data. Can you 
provide details? 

3) Generally I modify the OPTFLAGS in the nmake.opt file to include /Zi and
a /Fd directive to put all debug info in one .pdb file.  With this build I 
am generally able to debug adequately in visual studio.   There should be
a typical "debug build" OPTFLAGS value commented out in the nmake.opt file
next to the OPTFLAGS value that is being used. 

4) I don't support a visual studio project file.  It is hard enough for me to
maintain a set of NMAKE files for stuff without worrying about a project file 
too.  You can do it yourself, but you will find it alot of work to setup.  
It is *not* necessary if you just want to debug. 

comment:2 by warmerdam, 19 years ago


I am closing this bug since I don't think there is any outstanding action
item.  If you still feel there is a bug in the handling of 16bit SAR CEOS
data don't hesitate to re-open the bug and add details. 

Note: See TracTickets for help on using tickets.