Skip to content

Commit 9f26574

Browse files
committedDec 13, 2016
Fix WMS 1.3. compliance: distort image if width/height ratio of bbox is different to WIDTH/HEIGHT of requested image
Not decrease but increase image
1 parent f48f90e commit 9f26574

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
 

‎src/server/qgswmsserver.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2012,13 +2012,13 @@ QImage* QgsWmsServer::createImage( int width, int height, bool useBbox ) const
20122012
{
20132013
if ( mapWidthHeightRatio >= imageWidthHeightRatio )
20142014
{
2015-
//decrease image height
2016-
height = width / mapWidthHeightRatio;
2015+
//increase image height
2016+
height = width * mapWidthHeightRatio;
20172017
}
20182018
else
20192019
{
2020-
//decrease image width
2021-
width = height * mapWidthHeightRatio;
2020+
//increase image width
2021+
width = height / mapWidthHeightRatio;
20222022
}
20232023
}
20242024
}

0 commit comments

Comments
 (0)
Please sign in to comment.