Bug 560283 – "Scale image..." causes distortion around edges.

2008-11-11  Sven Neumann  <sven@gimp.org>

	Bug 560283 – "Scale image..." causes distortion around edges.

	* app/paint-funcs/scale-region.c (scale): corrected fix for
	bug #556248.


svn path=/trunk/; revision=27612
This commit is contained in:
Sven Neumann 2008-11-11 07:47:31 +00:00 committed by Sven Neumann
parent cb2e2b636a
commit 8ad82efc25
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2008-11-11 Sven Neumann <sven@gimp.org>
Bug 560283 "Scale image..." causes distortion around edges.
* app/paint-funcs/scale-region.c (scale): corrected fix for
bug #556248.
2008-11-11 Sven Neumann <sven@gimp.org>
* plug-ins/common/file-pdf.c: also return image type and number of

View File

@ -509,7 +509,7 @@ scale (TileManager *srcTM,
for (y = region.y; y < y1; y++)
{
guchar *pixel = row;
gdouble yfrac = y * scaley + 0.5;
gdouble yfrac = (y + 0.5) * scaley - 0.5;
gint sy = (gint) yfrac;
gint x;
@ -517,7 +517,7 @@ scale (TileManager *srcTM,
for (x = region.x; x < x1; x++)
{
gdouble xfrac = x * scalex + 0.5;
gdouble xfrac = (x + 0.5) * scalex - 0.5;
gint sx = (gint) xfrac;
xfrac = xfrac - sx;