Changeset 13715

Show
Ignore:
Timestamp:
02/06/08 15:05:24 (5 months ago)
Author:
rouault
Message:

Apply gdal_svn_trunk_bug_1939_1692.patch (#1939)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/frmts/ecw/ecwcreatecopy.cpp

    r10957 r13715  
    10131013        return NULL; 
    10141014    } 
     1015     
     1016    if (poSrcDS->GetRasterBand(1)->GetColorTable() != NULL) 
     1017    { 
     1018        CPLError( (bStrict) ? CE_Failure : CE_Warning, CPLE_NotSupported,  
     1019                  "ECW driver ignores color table. " 
     1020                  "The source raster band will be considered as grey level.\n" ); 
     1021        if (bStrict) 
     1022            return NULL; 
     1023    } 
    10151024 
    10161025    return ECWCreateCopy( pszFilename, poSrcDS, bStrict, papszOptions,  
     
    10521061 
    10531062        return NULL; 
     1063    } 
     1064 
     1065    if (poSrcDS->GetRasterBand(1)->GetColorTable() != NULL) 
     1066    { 
     1067        CPLError( (bStrict) ? CE_Failure : CE_Warning, CPLE_NotSupported,  
     1068                  "ECW driver ignores color table. " 
     1069                  "The source raster band will be considered as grey level.\n" ); 
     1070        if (bStrict) 
     1071            return NULL; 
    10541072    } 
    10551073 
  • trunk/gdal/frmts/jpeg/jpgdataset.cpp

    r13687 r13715  
    17361736        poSrcDS->GetRasterBand(1)->GetColorTable() != NULL) 
    17371737    { 
    1738         CPLError( CE_Warning, CPLE_NotSupported,  
     1738        CPLError( (bStrict) ? CE_Failure : CE_Warning, CPLE_NotSupported,  
    17391739                  "JPEG driver ignores color table. " 
    17401740                  "The source raster band will be considered as grey level.\n" ); 
     1741        if (bStrict) 
     1742            return NULL; 
    17411743    } 
    17421744 
  • trunk/gdal/frmts/jpeg2000/jpeg2000dataset.cpp

    r12396 r13715  
    733733    int  nYSize = poSrcDS->GetRasterYSize(); 
    734734 
     735    if (poSrcDS->GetRasterBand(1)->GetColorTable() != NULL) 
     736    { 
     737        CPLError( (bStrict) ? CE_Failure : CE_Warning, CPLE_NotSupported,  
     738                  "JPEG2000 driver ignores color table. " 
     739                  "The source raster band will be considered as grey level.\n" ); 
     740        if (bStrict) 
     741            return NULL; 
     742    } 
     743     
    735744    if( !pfnProgress( 0.0, NULL, pProgressData ) ) 
    736745        return NULL; 
  • trunk/gdal/frmts/mrsid/mrsiddataset.cpp

    r12686 r13715  
    28312831    bool bMeter = true; 
    28322832#endif     
    2833  
     2833     
     2834    if (poSrcDS->GetRasterBand(1)->GetColorTable() != NULL) 
     2835    { 
     2836        CPLError( (bStrict) ? CE_Failure : CE_Warning, CPLE_NotSupported,  
     2837                  "MrSID driver ignores color table. " 
     2838                  "The source raster band will be considered as grey level.\n" ); 
     2839        if (bStrict) 
     2840            return NULL; 
     2841    } 
     2842     
    28342843    // Output Mrsid Version 2 file. 
    28352844    if( pszVersion && atoi(pszVersion) == 2 ) 
     
    29913000    int nYSize = poSrcDS->GetRasterYSize(); 
    29923001    LT_STATUS  eStat; 
     3002     
     3003    if (poSrcDS->GetRasterBand(1)->GetColorTable() != NULL) 
     3004    { 
     3005        CPLError( (bStrict) ? CE_Failure : CE_Warning, CPLE_NotSupported,  
     3006                  "MrSID driver ignores color table. " 
     3007                  "The source raster band will be considered as grey level.\n" ); 
     3008        if (bStrict) 
     3009            return NULL; 
     3010    } 
    29933011       
    29943012    if( !pfnProgress( 0.0, NULL, pProgressData ) )