Skip to content
Permalink
Browse files

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.
  • Loading branch information
rldhont committed May 14, 2013
1 parent 0caf665 commit 91419babb6f9d8244d05760b05444dfbaa30c319
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/mapserver/qgshttprequesthandler.cpp
@@ -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;
}

0 comments on commit 91419ba

Please sign in to comment.
You can’t perform that action at this time.