Skip to content

Commit

Permalink
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/server/services/wms/qgswmsutils.cpp
Original file line number Diff line number Diff line change
@@ -114,8 +114,8 @@ namespace QgsWms
{
case PNG:
result = img;
contentType = "image/png";
saveFormat = "PNG";
contentType = QStringLiteral( "image/png" );
saveFormat = QStringLiteral( "PNG" );
break;
case PNG8:
{
@@ -130,34 +130,34 @@ namespace QgsWms
Qt::ColorOnly | Qt::ThresholdDither |
Qt::ThresholdAlphaDither | Qt::NoOpaqueDetection );
}
contentType = "image/png";
saveFormat = "PNG";
contentType = QStringLiteral( "image/png" );
saveFormat = QStringLiteral( "PNG" );
break;
case PNG16:
result = img.convertToFormat( QImage::Format_ARGB4444_Premultiplied );
contentType = "image/png";
saveFormat = "PNG";
contentType = QStringLiteral( "image/png" );
saveFormat = QStringLiteral( "PNG" );
break;
case PNG1:
result = img.convertToFormat( QImage::Format_Mono,
Qt::MonoOnly | Qt::ThresholdDither |
Qt::ThresholdAlphaDither | Qt::NoOpaqueDetection );
contentType = "image/png";
saveFormat = "PNG";
contentType = QStringLiteral( "image/png" );
saveFormat = QStringLiteral( "PNG" );
break;
case JPEG:
result = img;
contentType = "image/jpeg";
saveFormat = "JPEG";
contentType = QStringLiteral( "image/jpeg" );
saveFormat = QStringLiteral( "JPEG" );
break;
case WEBP:
result = img;
contentType = QStringLiteral( "image/webp" );
saveFormat = QStringLiteral( "WEBP" );
break;
default:
QgsMessageLog::logMessage( QString( "Unsupported format string %1" ).arg( formatStr ) );
saveFormat = "Unknown";
QgsMessageLog::logMessage( QStringLiteral( "Unsupported format string %1" ).arg( formatStr ) );
saveFormat = QStringLiteral( "Unknown" );
break;
}

0 comments on commit a49e7c8

Please sign in to comment.