From f747a59e2b5be0e98acd6e78821c08e8bdf2351c Mon Sep 17 00:00:00 2001 From: Sven Neumann Date: Wed, 6 Nov 2002 20:37:19 +0000 Subject: [PATCH] applied a patch from Toby Smith that moves the call to 2002-11-06 Sven Neumann * plug-ins/common/papertile.c: applied a patch from Toby Smith that moves the call to gimp_drawable_mask_bounds() to the filter() function so that the filter is applied to the correct selection even if it changed after the plug-in dialog was opened. * plug-ins/common/unsharp.c (unsharp_mask_dialog): allow larger values for the radius (as suggested #92250). * plug-ins/common/png.c: applied patch from Raphael Quinet that untoggles the "Save background color" option for images w/o an alpha channel (#92395). --- ChangeLog | 14 ++++++++++++++ plug-ins/common/papertile.c | 16 ++++++++-------- plug-ins/common/png.c | 10 +++++++++- plug-ins/common/unsharp.c | 4 ++-- 4 files changed, 33 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9b7fedd412..8b43f0e0bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2002-11-06 Sven Neumann + + * plug-ins/common/papertile.c: applied a patch from Toby Smith + that moves the call to gimp_drawable_mask_bounds() to the filter() + function so that the filter is applied to the correct selection + even if it changed after the plug-in dialog was opened. + + * plug-ins/common/unsharp.c (unsharp_mask_dialog): allow larger + values for the radius (as suggested #92250). + + * plug-ins/common/png.c: applied patch from Raphael Quinet that + untoggles the "Save background color" option for images w/o an + alpha channel (#92395). + 2002-11-06 Sven Neumann * app/base/base.c (base_init): don't say we'd use MMX if it is diff --git a/plug-ins/common/papertile.c b/plug-ins/common/papertile.c index 11bce3ba88..303e15b127 100644 --- a/plug-ins/common/papertile.c +++ b/plug-ins/common/papertile.c @@ -546,6 +546,14 @@ filter (void) gimp_progress_init (_("Paper Tile...")); + gimp_drawable_mask_bounds (p.drawable->drawable_id, + &p.selection.x0, &p.selection.y0, + &p.selection.x1, &p.selection.y1); + p.selection.width = p.selection.x1 - p.selection.x0; + p.selection.height = p.selection.y1 - p.selection.y0; + + gimp_tile_cache_ntiles (2 * (p.selection.width / gimp_tile_width () + 1)); + /* TILES */ srand (0); division_x = p.params.division_x; @@ -847,14 +855,6 @@ plugin_run (gchar *name, p.drawable = gimp_drawable_get(params[2].data.d_drawable); p.drawable_has_alpha = gimp_drawable_has_alpha(p.drawable->drawable_id); - gimp_drawable_mask_bounds (p.drawable->drawable_id, - &p.selection.x0, &p.selection.y0, - &p.selection.x1, &p.selection.y1); - p.selection.width = p.selection.x1 - p.selection.x0; - p.selection.height = p.selection.y1 - p.selection.y0; - - gimp_tile_cache_ntiles (2 * (p.selection.width / gimp_tile_width () + 1)); - if (gimp_drawable_is_rgb (p.drawable->drawable_id)) { switch (p.run_mode) diff --git a/plug-ins/common/png.c b/plug-ins/common/png.c index abbff06945..a20ddc0d74 100644 --- a/plug-ins/common/png.c +++ b/plug-ins/common/png.c @@ -60,7 +60,7 @@ * Constants... */ -#define PLUG_IN_VERSION "1.3.3 - 30 June 2000" +#define PLUG_IN_VERSION "1.3.4 - 03 September 2002" #define SCALE_WIDTH 125 #define DEFAULT_GAMMA 2.20 @@ -322,6 +322,14 @@ run (gchar * name, */ gimp_get_data ("file_png_save", &pngvals); + /* + * If the image has no transparency, then there is usually + * no need to save a bKGD chunk. For more information, see: + * http://bugzilla.gnome.org/show_bug.cgi?id=92395 + */ + if (! gimp_drawable_has_alpha (drawable_ID)) + pngvals.bkgd = FALSE; + /* * Then acquire information with a dialog... */ diff --git a/plug-ins/common/unsharp.c b/plug-ins/common/unsharp.c index 98d5268289..b4afb6dfe2 100644 --- a/plug-ins/common/unsharp.c +++ b/plug-ins/common/unsharp.c @@ -237,7 +237,7 @@ run (gchar *name, /* make sure there are legal values */ if ((unsharp_params.radius < 0.0) || - (unsharp_params.amount<0.0)) + (unsharp_params.amount < 0.0)) status = GIMP_PDB_CALLING_ERROR; } break; @@ -812,7 +812,7 @@ unsharp_mask_dialog (void) adj = gimp_scale_entry_new (GTK_TABLE (table), 0, 0, _("_Radius:"), SCALE_WIDTH, ENTRY_WIDTH, - unsharp_params.radius, 0.1, 25.0, 0.1, 1.0, 1, + unsharp_params.radius, 0.1, 120.0, 0.1, 1.0, 1, TRUE, 0, 0, NULL, NULL); g_signal_connect (G_OBJECT (adj), "value_changed",