Changeset 14449

Show
Ignore:
Timestamp:
05/11/08 14:09:39 (2 months ago)
Author:
rouault
Message:

Set IREP=RGB implicitely when the first 3 channels of an image are R,G,B (#2343)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/frmts/nitf/nitfdataset.cpp

    r14436 r14449  
    28562856    if( CSLFetchNameValue(papszFullOptions,"IREP") == NULL ) 
    28572857    { 
    2858         if( poSrcDS->GetRasterCount() == 3 && eType == GDT_Byte ) 
     2858        if ( ((poSrcDS->GetRasterCount() == 3 && bJPEG) || 
     2859              (poSrcDS->GetRasterCount() >= 3 && !bJPEG)) && eType == GDT_Byte && 
     2860             poSrcDS->GetRasterBand(1)->GetColorInterpretation() == GCI_RedBand && 
     2861             poSrcDS->GetRasterBand(2)->GetColorInterpretation() == GCI_GreenBand && 
     2862             poSrcDS->GetRasterBand(3)->GetColorInterpretation() == GCI_BlueBand) 
    28592863        { 
    28602864            if( bJPEG )