Skip to content

Commit

Permalink
GTiff: fix ff769d9
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Jul 5, 2023
1 parent 8847160 commit 60d059d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions frmts/gtiff/gtiffdataset_write.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6159,8 +6159,8 @@ GDALDataset *GTiffDataset::Create(const char *pszFilename, int nXSize,
poDS->m_nZSTDLevel = GTiffGetZSTDPreset(papszParamList);
poDS->m_nWebPLevel = GTiffGetWebPLevel(papszParamList);
poDS->m_bWebPLossless = GTiffGetWebPLossless(papszParamList);
if (CSLFetchNameValue(papszParamList, "WEBP_LEVEL") &&
poDS->m_bWebPLossless)
if (poDS->m_nWebPLevel != 100 && poDS->m_bWebPLossless &&
CSLFetchNameValue(papszParamList, "WEBP_LEVEL"))
{
CPLError(CE_Warning, CPLE_AppDefined,
"WEBP_LEVEL is specified, but WEBP_LOSSLESS=YES. "
Expand Down Expand Up @@ -7451,7 +7451,8 @@ GDALDataset *GTiffDataset::CreateCopy(const char *pszFilename,
poDS->m_nZSTDLevel = GTiffGetZSTDPreset(papszOptions);
poDS->m_nWebPLevel = GTiffGetWebPLevel(papszOptions);
poDS->m_bWebPLossless = GTiffGetWebPLossless(papszOptions);
if (CSLFetchNameValue(papszOptions, "WEBP_LEVEL") && poDS->m_bWebPLossless)
if (poDS->m_nWebPLevel != 100 && poDS->m_bWebPLossless &&
CSLFetchNameValue(papszOptions, "WEBP_LEVEL"))
{
CPLError(CE_Warning, CPLE_AppDefined,
"WEBP_LEVEL is specified, but WEBP_LOSSLESS=YES. "
Expand Down

0 comments on commit 60d059d

Please sign in to comment.