mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-21 03:52:33 +00:00
fixed boundary conditions.
2005-08-17 Sven Neumann <sven@gimp.org> * plug-ins/common/deinterlace.c: fixed boundary conditions.
This commit is contained in:
parent
f518fbf0ec
commit
95e014f514
|
@ -1,3 +1,7 @@
|
|||
2005-08-17 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/common/deinterlace.c: fixed boundary conditions.
|
||||
|
||||
2005-08-16 Akkana Peck <akkana@cvs.gnome.org>
|
||||
|
||||
* plug-ins/script-fu/scripts/grid-system.scm: Rename "Grid" to
|
||||
|
|
|
@ -168,7 +168,6 @@ run (const gchar *name,
|
|||
}
|
||||
else
|
||||
{
|
||||
/* gimp_message ("deinterlace: cannot operate on indexed color images"); */
|
||||
status = GIMP_PDB_EXECUTION_ERROR;
|
||||
}
|
||||
}
|
||||
|
@ -236,16 +235,18 @@ deinterlace (GimpDrawable *drawable,
|
|||
{
|
||||
gimp_pixel_rgn_get_row (&srcPR, dest, x, row, width);
|
||||
|
||||
/* Only do interpolation if the row:
|
||||
* (1) Isn't one we want to keep
|
||||
* (2) Has both an upper and a lower row
|
||||
* Otherwise, just duplicate the source row
|
||||
*/
|
||||
if ((row % 2 != devals.evenness) &&
|
||||
(row - 1 >= 0) && (row + 1 < drawable->height))
|
||||
if (row % 2 != devals.evenness)
|
||||
{
|
||||
gimp_pixel_rgn_get_row (&srcPR, upper, x, row - 1, width);
|
||||
gimp_pixel_rgn_get_row (&srcPR, lower, x, row + 1, width);
|
||||
if (row > 0)
|
||||
gimp_pixel_rgn_get_row (&srcPR, upper, x, row - 1, width);
|
||||
else
|
||||
gimp_pixel_rgn_get_row (&srcPR, upper, x, devals.evenness, width);
|
||||
|
||||
if (row + 1 < drawable->height)
|
||||
gimp_pixel_rgn_get_row (&srcPR, lower, x, row + 1, width);
|
||||
else
|
||||
gimp_pixel_rgn_get_row (&srcPR, lower, x, row - 1 + devals.evenness,
|
||||
width);
|
||||
|
||||
if (has_alpha)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue