Skip to content

Commit 91419ba

Browse files
committed
Reactivated 8bit and 1bit mode for QGIS Server
The commit 76d1f95 simplified the mFormat private attribute to PNG, JPG, PDF, etc and created mFormatString attribute. The second is used for base64 but not for mode. This commit corrected it.
1 parent 0caf665 commit 91419ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mapserver/qgshttprequesthandler.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ void QgsHttpRequestHandler::sendGetMapResponse( const QString& service, QImage*
9696
QgsDebugMsg( "Sending getmap response..." );
9797
if ( img )
9898
{
99-
bool png8Bit = ( mFormat.compare( "image/png; mode=8bit", Qt::CaseInsensitive ) == 0 );
100-
bool png1Bit = ( mFormat.compare( "image/png; mode=1bit", Qt::CaseInsensitive ) == 0 );
99+
bool png8Bit = ( mFormatString.compare( "image/png; mode=8bit", Qt::CaseInsensitive ) == 0 );
100+
bool png1Bit = ( mFormatString.compare( "image/png; mode=1bit", Qt::CaseInsensitive ) == 0 );
101101
bool isBase64 = mFormatString.endsWith( ";base64", Qt::CaseInsensitive );
102102
if ( mFormat != "PNG" && mFormat != "JPG" && !png8Bit && !png1Bit )
103103
{
104104
QgsDebugMsg( "service exception - incorrect image format requested..." );
105-
sendServiceException( QgsMapServiceException( "InvalidFormat", "Output format '" + mFormat + "' is not supported in the GetMap request" ) );
105+
sendServiceException( QgsMapServiceException( "InvalidFormat", "Output format '" + mFormatString + "' is not supported in the GetMap request" ) );
106106
return;
107107
}
108108

0 commit comments

Comments
 (0)