* Bump azure/trusted-signing-action from 0.5.0 to 0.5.1 in #7895 * Enable any dither method such as Floyd-Steinberg for Magick::Image::map() in #7937 * Magick++ Documentation Verification in #7906 * fix type casting in statistic.c in #7982 - removed patched (upstreamed) - ImageMagick-0-1-are-special-cases-for-pow.patch - ImageMagick-check-for-pow-zero.patch - ImageMagick-gamma-should-call-GammaImage.patch OBS-URL: https://build.opensuse.org/package/show/graphics/ImageMagick?expand=0&rev=752
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:
|
|
|