Skip to content

Commit

Permalink
Fix WMS 1.3. compliance: distort image if width/height ratio of bbox …
Browse files Browse the repository at this point in the history
…is different to WIDTH/HEIGHT of requested image

Not decrease but increase image
  • Loading branch information
rldhont committed Dec 13, 2016
1 parent 7e40fb4 commit 903e8cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/server/qgswmsserver.cpp
Expand Up @@ -2013,13 +2013,13 @@ QImage* QgsWMSServer::createImage( int width, int height, bool useBbox ) const
{
if ( mapWidthHeightRatio >= imageWidthHeightRatio )
{
//decrease image height
height = width / mapWidthHeightRatio;
//increase image height
height = width * mapWidthHeightRatio;
}
else
{
//decrease image width
width = height * mapWidthHeightRatio;
//increase image width
width = height / mapWidthHeightRatio;
}
}
}
Expand Down

0 comments on commit 903e8cf

Please sign in to comment.