minor cleanups.
2007-04-25 Sven Neumann <sven@gimp.org> * plug-ins/common/despeckle.c: minor cleanups. svn path=/trunk/; revision=22320
This commit is contained in:
parent
e3813131b7
commit
9e0e86f7bd
@ -1,3 +1,7 @@
|
||||
2007-04-25 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/common/despeckle.c: minor cleanups.
|
||||
|
||||
2007-04-25 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* libgimpwidgets/gimpscrolledpreview.c: also use the middle mouse
|
||||
|
@ -217,7 +217,7 @@ run (const gchar *name,
|
||||
if (gimp_drawable_is_rgb(drawable->drawable_id) ||
|
||||
gimp_drawable_is_gray(drawable->drawable_id))
|
||||
{
|
||||
if (!despeckle_dialog ())
|
||||
if (! despeckle_dialog ())
|
||||
return;
|
||||
}
|
||||
break;
|
||||
@ -609,7 +609,7 @@ despeckle_median (guchar *src,
|
||||
buf = g_new (guchar *, box);
|
||||
ibuf = g_new (guchar, box);
|
||||
|
||||
if (!preview)
|
||||
if (! preview)
|
||||
gimp_progress_init(_("Despeckle"));
|
||||
|
||||
for (y = 0; y < height; y++)
|
||||
@ -685,11 +685,11 @@ despeckle_median (guchar *src,
|
||||
|
||||
progress += width;
|
||||
|
||||
if (!preview && y % 20 == 0)
|
||||
if (! preview && y % 32 == 0)
|
||||
gimp_progress_update ((gdouble) progress / (gdouble) max_progress);
|
||||
}
|
||||
|
||||
if (!preview)
|
||||
if (! preview)
|
||||
gimp_progress_update (1.0);
|
||||
|
||||
g_free (ibuf);
|
||||
@ -813,6 +813,15 @@ pixel_copy (guchar *dest,
|
||||
const guchar *src,
|
||||
gint bpp)
|
||||
{
|
||||
for (; bpp > 0; bpp--, dest++, src++)
|
||||
*dest = *src;
|
||||
switch (bpp)
|
||||
{
|
||||
case 4:
|
||||
*dest++ = *src++;
|
||||
case 3:
|
||||
*dest++ = *src++;
|
||||
case 2:
|
||||
*dest++ = *src++;
|
||||
case 1:
|
||||
*dest++ = *src++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user