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 f48f90e commit 9f26574
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/server/qgswmsserver.cpp
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2012,13 +2012,13 @@ QImage* QgsWmsServer::createImage( int width, int height, bool useBbox ) const
{ {
if ( mapWidthHeightRatio >= imageWidthHeightRatio ) if ( mapWidthHeightRatio >= imageWidthHeightRatio )
{ {
//decrease image height //increase image height
height = width / mapWidthHeightRatio; height = width * mapWidthHeightRatio;
} }
else else
{ {
//decrease image width //increase image width
width = height * mapWidthHeightRatio; width = height / mapWidthHeightRatio;
} }
} }
} }
Expand Down

0 comments on commit 9f26574

Please sign in to comment.