Re: [PATCH pixman 04/13] pixman-filter: put error on center of odd-sized filters
Bill Spitzak <[email protected]>
| Newsgroups | gmane.comp.lib.cairo |
|---|---|
| Message-ID | <5412578C.4080702__7887.58570929549$1410488302$gmane$org@gmail.com> |
This fixes the "dots" results you got if the image was scaled larger and IMPULSE used as the sampling filter. On 09/11/2014 07:12 PM, Bill Spitzak wrote: > --- > pixman/pixman-filter.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/pixman/pixman-filter.c b/pixman/pixman-filter.c > index a9af72c..816d085 100644 > --- a/pixman/pixman-filter.c > +++ b/pixman/pixman-filter.c > @@ -294,7 +294,7 @@ create_1d_filter (int *width, > } > > if (new_total != pixman_fixed_1) > - *(p - *width / 2) += (pixman_fixed_1 - new_total); > + *(p - (*width + 1) / 2) += (pixman_fixed_1 - new_total); > } > > return params; > -- cairo mailing list [email protected] http://lists.cairographics.org/mailman/listinfo/cairo