Skip to content

Commit

Permalink
Reactivated 8bit and 1bit mode for QGIS Server
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rldhont committed May 14, 2013
1 parent 0caf665 commit 91419ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mapserver/qgshttprequesthandler.cpp
Expand Up @@ -96,13 +96,13 @@ void QgsHttpRequestHandler::sendGetMapResponse( const QString& service, QImage*
QgsDebugMsg( "Sending getmap response..." );
if ( img )
{
bool png8Bit = ( mFormat.compare( "image/png; mode=8bit", Qt::CaseInsensitive ) == 0 );
bool png1Bit = ( mFormat.compare( "image/png; mode=1bit", Qt::CaseInsensitive ) == 0 );
bool png8Bit = ( mFormatString.compare( "image/png; mode=8bit", Qt::CaseInsensitive ) == 0 );
bool png1Bit = ( mFormatString.compare( "image/png; mode=1bit", Qt::CaseInsensitive ) == 0 );
bool isBase64 = mFormatString.endsWith( ";base64", Qt::CaseInsensitive );
if ( mFormat != "PNG" && mFormat != "JPG" && !png8Bit && !png1Bit )
{
QgsDebugMsg( "service exception - incorrect image format requested..." );
sendServiceException( QgsMapServiceException( "InvalidFormat", "Output format '" + mFormat + "' is not supported in the GetMap request" ) );
sendServiceException( QgsMapServiceException( "InvalidFormat", "Output format '" + mFormatString + "' is not supported in the GetMap request" ) );
return;
}

Expand Down

0 comments on commit 91419ba

Please sign in to comment.