Changeset 11906
- Timestamp:
- 08/18/07 12:08:22 (1 year ago)
- Files:
-
- trunk/gdal/frmts/nitf/nitfdataset.cpp (modified) (1 diff)
- trunk/gdal/frmts/nitf/nitfimage.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/gdal/frmts/nitf/nitfdataset.cpp
r11798 r11906 240 240 sEntry.c2 = psBandInfo->pabyLUT[256 + iColor]; 241 241 sEntry.c3 = psBandInfo->pabyLUT[512 + iColor]; 242 sEntry.c4 = 255;242 sEntry.c4 = (psImage->bNoDataSet && psImage->nNoDataValue == iColor) ? 0 : 255; 243 243 244 244 poColorTable->SetColorEntry( iColor, &sEntry ); trunk/gdal/frmts/nitf/nitfimage.c
r11904 r11906 772 772 } 773 773 774 /* Bug #1751 : Add a transparent color if they are none. Absent subblocks will be then transparent */ 775 if (psImage->bNoDataSet == FALSE && psImage->nBands == 1 && psImage->nBitsPerSample == 8) 776 { 777 NITFBandInfo *psBandInfo = psImage->pasBandInfo; 778 if (psBandInfo->nSignificantLUTEntries < 256-1) 779 { 780 psBandInfo->pabyLUT[0+psBandInfo->nSignificantLUTEntries] = 0; 781 psBandInfo->pabyLUT[256+psBandInfo->nSignificantLUTEntries] = 0; 782 psBandInfo->pabyLUT[512+psBandInfo->nSignificantLUTEntries] = 0; 783 psImage->bNoDataSet = TRUE; 784 psImage->nNoDataValue = psBandInfo->nSignificantLUTEntries; 785 psBandInfo->nSignificantLUTEntries ++; 786 } 787 } 788 774 789 /* -------------------------------------------------------------------- */ 775 790 /* We override the coordinates found in IGEOLO in case a BLOCKA is */
