mirror of https://github.com/GNOME/gimp.git
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:
parent
cb2e2b636a
commit
8ad82efc25
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue