miscalculation of summarized quantize_error
Posted: 2013-07-11T23:31:41-07:00
quantize_error summarization has been changed at 6.4.1-3
* magick/quantize.c
- 6.4.1-2
- 6.4.1-3
This change causes a color quality degradation of quantized images.
- correct code, I think.
ref) my patch at 6.x
- https://github.com/gree/YoyaMagick/comm ... e1bf7ac540
* magick/quantize.c
- 6.4.1-2
Code: Select all
node_info->quantize_error+=sqrt((double) (error.red*error.red+
error.green*error.green+error.blue*error.blue+error.opacity*
error.opacity));
- 6.4.1-3
Code: Select all
if (IsColorSimilar(image,p,p+count) == MagickFalse)
break;
(omit...)
node_info->quantize_error+=sqrt((double) (count*error.red*error.red+
count*error.green*error.green+count*error.blue*error.blue+
count*error.opacity*error.opacity));
This change causes a color quality degradation of quantized images.
- correct code, I think.
Code: Select all
if (IsColorSimilar(image,p,p+count) == MagickFalse)
break;
(omit...)
node_info->quantize_error+=count*sqrt((double) (error.red*error.red+
error.green*error.green+error.blue*error.blue+
error.opacity*error.opacity));
ref) my patch at 6.x
- https://github.com/gree/YoyaMagick/comm ... e1bf7ac540