From 134c354a9eb4cdab412141ec4fa02bd0b4c2673a Mon Sep 17 00:00:00 2001 From: Anders Jonsson Date: Wed, 3 Apr 2024 22:40:42 +0200 Subject: [PATCH] app, pdb, plug-ins: lower Spread limit for Distort Distort can call plug-in-spread with Spread of 1000 which causes an error. This limits it to 512 which is the highest allowed by gegl:noise-spread --- app/pdb/plug-in-compat-cmds.c | 4 ++-- pdb/groups/plug_in_compat.pdb | 4 ++-- plug-ins/script-fu/scripts/distress-selection.scm | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/pdb/plug-in-compat-cmds.c b/app/pdb/plug-in-compat-cmds.c index b8a7585c5b..52fa5f8de4 100644 --- a/app/pdb/plug-in-compat-cmds.c +++ b/app/pdb/plug-in-compat-cmds.c @@ -9103,13 +9103,13 @@ register_plug_in_compat_procs (GimpPDB *pdb) g_param_spec_double ("spread-amount-x", "spread amount x", "Horizontal spread amount", - 0, 200, 0, + 0, 512, 0, GIMP_PARAM_READWRITE)); gimp_procedure_add_argument (procedure, g_param_spec_double ("spread-amount-y", "spread amount y", "Vertical spread amount", - 0, 200, 0, + 0, 512, 0, GIMP_PARAM_READWRITE)); gimp_pdb_register_procedure (pdb, procedure); g_object_unref (procedure); diff --git a/pdb/groups/plug_in_compat.pdb b/pdb/groups/plug_in_compat.pdb index 5596d41ee2..a59b17d5ce 100644 --- a/pdb/groups/plug_in_compat.pdb +++ b/pdb/groups/plug_in_compat.pdb @@ -4449,9 +4449,9 @@ HELP desc => 'Input image (unused)' }, { name => 'drawable', type => 'drawable', desc => 'Input drawable' }, - { name => 'spread_amount_x', type => '0 <= float <= 200', + { name => 'spread_amount_x', type => '0 <= float <= 512', desc => 'Horizontal spread amount' }, - { name => 'spread_amount_y', type => '0 <= float <= 200', + { name => 'spread_amount_y', type => '0 <= float <= 512', desc => 'Vertical spread amount' } ); diff --git a/plug-ins/script-fu/scripts/distress-selection.scm b/plug-ins/script-fu/scripts/distress-selection.scm index 668db28603..26ea257094 100644 --- a/plug-ins/script-fu/scripts/distress-selection.scm +++ b/plug-ins/script-fu/scripts/distress-selection.scm @@ -111,7 +111,7 @@ SF-IMAGE "The image" 0 SF-DRAWABLE "The layer" 0 SF-ADJUSTMENT _"_Threshold (bigger 1<-->254 smaller)" '(127 1 254 1 10 0 0) - SF-ADJUSTMENT _"_Spread" '(8 0 1000 1 10 0 1) + SF-ADJUSTMENT _"_Spread" '(8 0 512 1 10 0 1) SF-ADJUSTMENT _"_Granularity (1 is low)" '(4 1 25 1 10 0 1) SF-ADJUSTMENT _"S_mooth" '(2 1 150 1 10 0 1) SF-TOGGLE _"Smooth hor_izontally" TRUE