OBS-URL: https://build.opensuse.org/package/show/graphics/ImageMagick?expand=0&rev=750
24 lines
920 B
Diff
24 lines
920 B
Diff
diff --git a/MagickCore/statistic.c b/MagickCore/statistic.c
|
|
index caa221e7f34..8489fa4a0d1 100644
|
|
--- a/MagickCore/statistic.c
|
|
+++ b/MagickCore/statistic.c
|
|
@@ -377,12 +377,13 @@ static double ApplyEvaluateOperator(RandomInfo *random_info,const Quantum pixel,
|
|
}
|
|
case PowEvaluateOperator:
|
|
{
|
|
- if (((double) pixel < 0) && ((value-floor(value)) > MagickEpsilon))
|
|
+ if (PerceptibleReciprocal(value) <= MagickEpsilon)
|
|
+ break;
|
|
+ if (((double) pixel < 0.0) && ((value-floor(value)) > MagickEpsilon))
|
|
result=(double) -((double) QuantumRange*pow(-(QuantumScale*(double)
|
|
- pixel),(double) value));
|
|
+ pixel),value));
|
|
else
|
|
- result=(double) QuantumRange*pow(QuantumScale*(double) pixel,
|
|
- (double) value);
|
|
+ result=(double) QuantumRange*pow(QuantumScale*(double) pixel,value);
|
|
break;
|
|
}
|
|
case RightShiftEvaluateOperator:
|
|
|