@@ -2618,32 +2618,32 @@ MagickExport ChannelStatistics *GetImageChannelStatistics(const Image *image,
2618
2618
*/
2619
2619
histogram [i ].red *=area ;
2620
2620
entropy = - histogram [i ].red * log2 (histogram [i ].red )*
2621
- MagickSafeReciprocal (log10 ((double ) number_bins .red ));
2621
+ MagickSafeReciprocal (log2 ((double ) number_bins .red ));
2622
2622
if (IsNaN (entropy ) == 0 )
2623
2623
channel_statistics [RedChannel ].entropy += entropy ;
2624
2624
histogram [i ].green *=area ;
2625
2625
entropy = - histogram [i ].green * log2 (histogram [i ].green )*
2626
- MagickSafeReciprocal (log10 ((double ) number_bins .green ));
2626
+ MagickSafeReciprocal (log2 ((double ) number_bins .green ));
2627
2627
if (IsNaN (entropy ) == 0 )
2628
2628
channel_statistics [GreenChannel ].entropy += entropy ;
2629
2629
histogram [i ].blue *=area ;
2630
2630
entropy = - histogram [i ].blue * log2 (histogram [i ].blue )*
2631
- MagickSafeReciprocal (log10 ((double ) number_bins .blue ));
2631
+ MagickSafeReciprocal (log2 ((double ) number_bins .blue ));
2632
2632
if (IsNaN (entropy ) == 0 )
2633
2633
channel_statistics [BlueChannel ].entropy += entropy ;
2634
2634
if (image -> matte != MagickFalse )
2635
2635
{
2636
2636
histogram [i ].opacity *=area ;
2637
2637
entropy = - histogram [i ].opacity * log2 (histogram [i ].opacity )*
2638
- MagickSafeReciprocal (log10 ((double ) number_bins .opacity ));
2638
+ MagickSafeReciprocal (log2 ((double ) number_bins .opacity ));
2639
2639
if (IsNaN (entropy ) == 0 )
2640
2640
channel_statistics [OpacityChannel ].entropy += entropy ;
2641
2641
}
2642
2642
if (image -> colorspace == CMYKColorspace )
2643
2643
{
2644
2644
histogram [i ].index *=area ;
2645
2645
entropy = - histogram [i ].index * log2 (histogram [i ].index )*
2646
- MagickSafeReciprocal (log10 ((double ) number_bins .index ));
2646
+ MagickSafeReciprocal (log2 ((double ) number_bins .index ));
2647
2647
if (IsNaN (entropy ) == 0 )
2648
2648
channel_statistics [IndexChannel ].entropy += entropy ;
2649
2649
}
0 commit comments