Ticket #1867 (new enhancement)
HFARasterBand::GetColorInterpretation can't report RGB colorspace
| Reported by: | mrosen | Owned by: | warmerdam |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | default | Version: | unspecified |
| Severity: | normal | Keywords: | |
| Cc: |
Description
HFARasterBand::GetColorInterpretation? can't report RGB colorspace.
I'm attaching two files to illustrate the issue
- an AUX file for an RGB image.
- an IMG file for a grayscale image.
In both cases gdalinfo reports ColorInterp?=Undefined for all bands. Using the fix below, the bands are reported correctly. ==========================
/************************************************************************/
/* GetColorInterpretation() */
/************************************************************************/
GDALColorInterp HFARasterBand::GetColorInterpretation()
{
HFADataset *poHDS = (HFADataset *) poDS;
if (poHDS->nBands == 3)
{
switch (nBand)
{
case 1: return GCI_BlueBand;
case 2: return GCI_GreenBand;
case 3: return GCI_RedBand;
}
}
else if (poCT != NULL)
{
return GCI_PaletteIndex;
}
else if (poHDS->nBands == 1) return GCI_GrayIndex;
return GCI_Undefined;
/*
if( poCT != NULL )
return GCI_PaletteIndex;
else
return GCI_Undefined;
*/
}
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

