diff --git a/ChangeLog b/ChangeLog index f75b906620..b9bfba2e25 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31006). * Enable alpha channel if background color is non-opaque (reference https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31016). + * Return correct offset for negative index for -fx option (reference + https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31019). 2016-12-05 7.0.3-9 Cristy * Release ImageMagick version 7.0.3-9, GIT revision 19139:6fed3f1:20161205. diff --git a/MagickCore/fx.c b/MagickCore/fx.c index 02404bbf63..8188cca867 100644 --- a/MagickCore/fx.c +++ b/MagickCore/fx.c @@ -1337,7 +1337,7 @@ static double FxGetSymbol(FxInfo *fx_info,const PixelChannel channel, *q='\0'; alpha=FxEvaluateSubexpression(fx_info,channel,x,y,subexpression, &depth,&beta,exception); - i=(ssize_t) (alpha+0.5); + i=(ssize_t) alpha; p++; } if (*p == '.')