Permalink
Browse files

Fix wrong un-premultiplication with bilinear resampler with non-opaqu…

…e input (#4993)
  • Loading branch information...
rouault committed Sep 12, 2014
1 parent aaffcf8 commit 1e94cc0dd1011126a6ec9fbb53ab5f807d4850c3
Showing with 3 additions and 3 deletions.
  1. +3 −3 mapresample.c
View
@@ -395,9 +395,6 @@ msBilinearRasterResampler( imageObj *psSrcImage, rasterBufferObj *src_rb,
if( dfWeightSum == 0.0 )
continue;
for( i = 0; i < bandCount; i++ )
padfPixelSum[i] /= dfWeightSum;
if( MS_RENDERER_PLUGIN(psSrcImage->format) ) {
assert(src_rb && dst_rb);
assert( src_rb->type == MS_BUFFER_BYTE_RGBA );
@@ -425,6 +422,9 @@ msBilinearRasterResampler( imageObj *psSrcImage, rasterBufferObj *src_rb,
int band;
int dst_off = nDstX + nDstY * psDstImage->width;
for( i = 0; i < bandCount; i++ )
padfPixelSum[i] /= dfWeightSum;
MS_SET_BIT(psDstImage->img_mask,dst_off);
for( band = 0; band < psSrcImage->format->bands; band++ ) {

0 comments on commit 1e94cc0

Please sign in to comment.