[mapserver-commits] r11733 - branches/branch-5-6/mapserver

svn at osgeo.org svn at osgeo.org
Fri May 20 16:12:13 EDT 2011


Author: warmerdam
Date: 2011-05-20 13:12:13 -0700 (Fri, 20 May 2011)
New Revision: 11733

Modified:
   branches/branch-5-6/mapserver/mapresample.c
Log:
avoid xmin/ymin/xmax/ymax going off raster for average resampling (#3886)

Modified: branches/branch-5-6/mapserver/mapresample.c
===================================================================
--- branches/branch-5-6/mapserver/mapresample.c	2011-05-20 20:11:01 UTC (rev 11732)
+++ branches/branch-5-6/mapserver/mapresample.c	2011-05-20 20:12:13 UTC (rev 11733)
@@ -668,10 +668,10 @@
             dfYMax = MAX(MAX(y1[nDstX],y1[nDstX+1]),
                          MAX(y2[nDstX],y2[nDstX+1]));
 
-            dfXMin = MAX(dfXMin,0);
-            dfYMin = MAX(dfYMin,0);
-            dfXMax = MIN(dfXMax,psSrcImage->width);
-            dfYMax = MIN(dfYMax,psSrcImage->height);
+            dfXMin = MIN(MAX(dfXMin,0),psSrcImage->width+1);
+            dfYMin = MIN(MAX(dfYMin,0),psSrcImage->height+1);
+            dfXMax = MIN(MAX(-1,dfXMax),psSrcImage->width);
+            dfYMax = MIN(MAX(-1,dfYMax),psSrcImage->height);
                 
             memset( padfPixelSum, 0, sizeof(double)*bandCount );
     


Property changes on: branches/branch-5-6/mapserver/mapresample.c
___________________________________________________________________
Added: svn:mergeinfo
   + /sandbox/aboudreault/mapresample.c:9103-9193
/trunk/mapserver/mapresample.c:9973-9982,10242,10489,11732



More information about the mapserver-commits mailing list