Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/3520
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed May 7, 2021
1 parent dd9b62d commit 8aa401e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
9 changes: 7 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2021-05-06 6.9.12-12 <quetzlzacatenango@image...>
* Release ImageMagick version 6.9.12-11 GIT revision 16...

2021-05-06 6.9.12-12 <quetzlzacatenango@image...>
* -layers optimize no longer produces broken output (reference
https://github.com/ImageMagick/ImageMagick/issues/3520).

2021-05-04 6.9.12-11 <quetzlzacatenango@image...>
* Release ImageMagick version 6.9.12-11 GIT revision 16625:7d8a3b762:20210504

Expand All @@ -23,8 +30,6 @@

2021-04-09 6.9.12-8 <quetzlzacatenango@image...>
* constrain sub-image list.
* -layers optimize no longer produces broken output (reference
https://github.com/ImageMagick/ImageMagick/issues/3520).
* write tiff colormapped images with an alpha channel as PHOTOMETRIC_RGB

2021-04-03 6.9.12-6 <quetzlzacatenango@image...>
Expand Down
10 changes: 5 additions & 5 deletions magick/quantize.c
Original file line number Diff line number Diff line change
Expand Up @@ -1784,11 +1784,11 @@ static MagickBooleanType RiemersmaDither(Image *image,CacheView *image_view,
AssociateAlphaPixel(cube_info,q,&pixel);
for (i=0; i < ErrorQueueLength; i++)
{
pixel.red+=p->weights[i]*p->error[i].red;
pixel.green+=p->weights[i]*p->error[i].green;
pixel.blue+=p->weights[i]*p->error[i].blue;
pixel.red+=p->weights[i]*p->error[i].red/16;
pixel.green+=p->weights[i]*p->error[i].green/16;
pixel.blue+=p->weights[i]*p->error[i].blue/16;
if (cube_info->associate_alpha != MagickFalse)
pixel.opacity+=p->weights[i]*p->error[i].opacity;
pixel.opacity+=p->weights[i]*p->error[i].opacity/16;
}
pixel.red=(MagickRealType) ClampPixel(pixel.red);
pixel.green=(MagickRealType) ClampPixel(pixel.green);
Expand Down Expand Up @@ -1993,7 +1993,7 @@ static CubeInfo *GetCubeInfo(const QuantizeInfo *quantize_info,
for (i=0; i < ErrorQueueLength; i++)
{
cube_info->weights[ErrorQueueLength-i-1]=PerceptibleReciprocal(weight);
weight*=exp(log(((double) QuantumRange+1.0))/(ErrorQueueLength-1.0));
weight*=exp(log(16)/(ErrorQueueLength-1.0));
}
/*
Normalize the weighting factors.
Expand Down

0 comments on commit 8aa401e

Please sign in to comment.