Opened 16 years ago
Closed 9 years ago
#2247 closed defect (wontfix)
GTiff RGB files c/w colour palette report 3 bands with GCI_Palette, GCI_Green, and GCI_Blue
Reported by: | mpd | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | minor | Keywords: | |
Cc: |
Description
We have a photometric=RGB file (from a reputable national mapping agency) that also has a colour table (no, I don't know either).
When read with GDAL, we get three bands: GCI_Palette, GCI_Green, and GCI_Blue
GTiffRasterBand::GTiffRasterBand
has the following:
if( poDS->poColorTable != NULL && nBand == 1 ) eBandInterp = GCI_PaletteIndex; else if( poDS->nPhotometric == PHOTOMETRIC_RGB
An old (pre-svn) version of the file (geotiff.cpp) has this commit message:
* Revision 1.157 2006/02/17 15:46:06 fwarmerdam * Ensure that an image is considered paletted if it has a palette, * even if the photometric interpretation is wrong.
(That is svn revision 9189.)
The problem is that band 1 is being considered in isolation. Could the dataset, after creating all of the bands, revert a photometric=RGB image with a colour table from palette-GB to RGB?
Change History (2)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
We could perhaps do something, but this would require at least examining a sample to have a better sense of what is going on. Closing as it seems to have fallen out of the radar of the reporter
Should we really try to make GDAL to handle such weird images? I would rather close this ticket as "wontfix".