Bug 556248 – Scaling gives 'jagged' edges

2008-10-16  Sven Neumann  <sven@gimp.org>

	Bug 556248 – Scaling gives 'jagged' edges

	* app/paint-funcs/scale-region.c (scale): calculate pixel
	contributions based on pixel centers, not on pixel origins.


svn path=/trunk/; revision=27292
This commit is contained in:
Sven Neumann 2008-10-15 22:43:27 +00:00 committed by Sven Neumann
parent 1ddd77a95d
commit f55b832bd3
2 changed files with 9 additions and 3 deletions

View File

@ -1,7 +1,13 @@
2008-10-16 Sven Neumann <sven@gimp.org>
* app/paint-funcs/scale-region.c (scale): calculate fractional
parts based on pixel centers, not pixel origins.
2008-10-15 Jakub Steiner <jimmac@gimp.org>
* themes/Default/images/stock-gegl.svg:
* themes/Default/images/stock-gegl-22.svg:
* themes/Default/images/stock-gegl-22.png: remove white from the
* themes/Default/images/stock-gegl-22.png: remove w + 0.5hite from the
shadow to render correctly on dark backgrounds.
2008-10-15 Michael Natterer <mitch@gimp.org>

View File

@ -522,7 +522,7 @@ scale (TileManager *srcTM,
for (y = region.y; y < y1; y++)
{
guchar *pixel = row;
gdouble yfrac = y / scaley;
gdouble yfrac = y / scaley + 0.5;
gint sy0 = (gint) yfrac;
gint x;
@ -530,7 +530,7 @@ scale (TileManager *srcTM,
for (x = region.x; x < x1; x++)
{
gdouble xfrac = x / scalex;
gdouble xfrac = x / scalex + 0.5;
gint sx0 = (gint) xfrac;
xfrac = xfrac - sx0;