[mapserver-commits] r7130 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Fri Nov 30 17:08:04 EST 2007


Author: warmerdam
Date: 2007-11-30 17:08:03 -0500 (Fri, 30 Nov 2007)
New Revision: 7130

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/mapresample.c
Log:
fix RAWMODE multiband average/bilinear (#2364)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2007-11-30 17:51:26 UTC (rev 7129)
+++ trunk/mapserver/HISTORY.TXT	2007-11-30 22:08:03 UTC (rev 7130)
@@ -124,7 +124,10 @@
   and is indicated by USE_LIBXML2 definition.  Use @ALL_ENABLED@ in 
   DEFINEs and mapscriptvars generation.
 
+- mapresample.c: Fixed support for multi-band data in RAW mode for bilinear
+  and nearest neighbour resamplers (#2364).
 
+
 Version 5.0.0 (2007-09-17)
 --------------------------
 

Modified: trunk/mapserver/mapresample.c
===================================================================
--- trunk/mapserver/mapresample.c	2007-11-30 17:51:26 UTC (rev 7129)
+++ trunk/mapserver/mapresample.c	2007-11-30 22:08:03 UTC (rev 7130)
@@ -597,21 +597,21 @@
                         psDstImage->img.raw_16bit[
                             nDstX + nDstY * psDstImage->width
                             + band*psDstImage->width*psDstImage->height] 
-                            = (short) padfPixelSum[0];
+                            = (short) padfPixelSum[band];
                     }
                     else if( psSrcImage->format->imagemode == MS_IMAGEMODE_FLOAT32)
                     {
                         psDstImage->img.raw_float[
                             nDstX + nDstY * psDstImage->width
                             + band*psDstImage->width*psDstImage->height] 
-                            = (float) padfPixelSum[0];
+                            = (float) padfPixelSum[band];
                     }
                     else if( psSrcImage->format->imagemode == MS_IMAGEMODE_BYTE )
                     {
                         psDstImage->img.raw_byte[
                             nDstX + nDstY * psDstImage->width
                             + band*psDstImage->width*psDstImage->height] 
-                            = (unsigned char) padfPixelSum[0];
+                            = (unsigned char) padfPixelSum[band];
                     }
                 }
             }
@@ -863,21 +863,21 @@
                         psDstImage->img.raw_16bit[
                             nDstX + nDstY * psDstImage->width
                             + band*psDstImage->width*psDstImage->height] 
-                            = (short) padfPixelSum[0];
+                            = (short) padfPixelSum[band];
                     }
                     else if( psSrcImage->format->imagemode == MS_IMAGEMODE_FLOAT32)
                     {
                         psDstImage->img.raw_float[
                             nDstX + nDstY * psDstImage->width
                             + band*psDstImage->width*psDstImage->height] 
-                            = (float) padfPixelSum[0];
+                            = (float) padfPixelSum[band];
                     }
                     else if( psSrcImage->format->imagemode == MS_IMAGEMODE_BYTE )
                     {
                         psDstImage->img.raw_byte[
                             nDstX + nDstY * psDstImage->width
                             + band*psDstImage->width*psDstImage->height] 
-                            = (unsigned char) padfPixelSum[0];
+                            = (unsigned char) padfPixelSum[band];
                     }
                 }
             }



More information about the mapserver-commits mailing list