RSS/Atom feed Twitter
Site is read-only, email is disabled

Error with plug-in Advanced Tone Mapping

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

Error with plug-in Advanced Tone Mapping Gerald Brosseau 26 Jul 16:05
  Error with plug-in Advanced Tone Mapping Helmut Jarausch via gimp-user-list 26 Jul 17:47
   Error with plug-in Advanced Tone Mapping Gerald Brosseau 26 Jul 22:14
  Error with plug-in Advanced Tone Mapping Helmut Jarausch via gimp-user-list 28 Jul 12:06
Gerald Brosseau
2018-07-26 16:05:50 UTC (over 5 years ago)

Error with plug-in Advanced Tone Mapping

I have always the same error with the Advanced Tone Mapping on large image ! (14903 x 5239 last attemp image size @ 300dpi)

Erreur lors de l’exécution de script-fu-advanced-tone-mapping :

Error: Procedure execution of plug-in-gauss failed on invalid input arguments:

La procédure « plug-in-gauss » a été appelée avec la valeur « 906,390000 » pour le paramètre « horizontal »

(#4, type gdouble). Cette valeur est hors-limite.

Any hint to correct this problem?

Gimp 2.10.4

Kubuntu 18.04

With 32g RAM

Gérald Brosseau
La Photo Du Jour
(www.gb-photodujour.com)
Sur internet depuis 1998
Helmut Jarausch via gimp-user-list
2018-07-26 17:47:05 UTC (over 5 years ago)

Error with plug-in Advanced Tone Mapping

On 07/26/2018 06:05:50 PM, Gerald Brosseau wrote:

I have always the same error with the Advanced Tone Mapping on large image ! (14903 x 5239 last attemp image size @ 300dpi)

Erreur lors de l’exécution de script-fu-advanced-tone-mapping :

Error: Procedure execution of plug-in-gauss failed on invalid input arguments:

La procédure « plug-in-gauss » a été appelée avec la valeur « 906,390000 » pour le paramètre « horizontal »

(#4, type gdouble). Cette valeur est hors-limite.

Any hint to correct this problem?

Try to apply the following patch

--- advancedtonemapping.scm.ORIG 2018-07-26 19:44:43.970031861 +0200
+++ advancedtonemapping.scm 2017-12-17 16:28:38.000000000 +0100 @@ -45,7 +45,7 @@

(define (my-duplicate-layer image layer) (let* ((dup-layer (car (gimp-layer-copy layer 1)))) - (gimp-image-add-layer image dup-layer 0) + (gimp-image-insert-layer image dup-layer 0 0) dup-layer))

(define (script-fu-advanced-tone-mapping @@ -73,7 +73,7 @@
)

;Apply the desaturate and invert to the top layer - (gimp-desaturate copy3)
+ (gimp-drawable-desaturate copy3 0) (gimp-invert copy3)

;Apply the blur with the supplied blur amount (in percents!)
@@ -108,7 +108,7 @@
;Merge the last layer down
(let ((final (car (gimp-image-merge-down theImage merged 0))))
;Name the layer so that we can see the parameters in its name
- (gimp-drawable-set-name final
+ (gimp-item-set-name final
(string-append
"tmapd: g "
(number->string
blurAmount)

With this it works on my Gimp-2.10.5 (GIT) Helmut

Gerald Brosseau
2018-07-26 22:14:14 UTC (over 5 years ago)

Error with plug-in Advanced Tone Mapping

Thanks but no help with the patch ...

$ patch -b /home/gb1804lts/.config/GIMP/2.10/scripts/advancedtonemapping.scm.orig /home/gb1804lts/patch_advanced-tone-mapping.scm patching file
/home/gb1804lts/.config/GIMP/2.10/scripts/advancedtonemapping.scm.orig Hunk #1 FAILED at 45.
Hunk #2 FAILED at 73.
Hunk #3 FAILED at 108.
3 out of 3 hunks FAILED -- saving rejects to file /home/gb1804lts/.config/GIMP/2.10/scripts/advancedtonemapping.scm.orig.rej

Le 2018-07-26 à 13:47, Helmut Jarausch a écrit :

On 07/26/2018 06:05:50 PM, Gerald Brosseau wrote:

I have always the same error with the Advanced Tone Mapping on large image ! (14903 x 5239 last attemp image size @ 300dpi)

Erreur lors de l’exécution de script-fu-advanced-tone-mapping :

Error: Procedure execution of plug-in-gauss failed on invalid input arguments:

La procédure « plug-in-gauss » a été appelée avec la valeur « 906,390000 » pour le paramètre « horizontal »

(#4, type gdouble). Cette valeur est hors-limite.

Any hint to correct this problem?

Try to apply the following patch

--- advancedtonemapping.scm.ORIG    2018-07-26 19:44:43.970031861 +0200 +++ advancedtonemapping.scm    2017-12-17 16:28:38.000000000 +0100 @@ -45,7 +45,7 @@

 (define (my-duplicate-layer image layer)      (let* ((dup-layer (car (gimp-layer-copy layer 1)))) -        (gimp-image-add-layer image dup-layer 0) +        (gimp-image-insert-layer image dup-layer 0 0)          dup-layer))

 (define (script-fu-advanced-tone-mapping @@ -73,7 +73,7 @@
         )

         ;Apply the desaturate and invert to the top layer -        (gimp-desaturate copy3)
+        (gimp-drawable-desaturate copy3 0)          (gimp-invert copy3)

         ;Apply the blur with the supplied blur amount (in percents!) @@ -108,7 +108,7 @@
             ;Merge the last layer down              (let ((final (car (gimp-image-merge-down theImage merged 0))))
                 ;Name the layer so that we can see the parameters in its name
-                (gimp-drawable-set-name final +                (gimp-item-set-name final                      (string-append
                         "tmapd: g "                          (number->string blurAmount)

With this it works on my Gimp-2.10.5 (GIT) Helmut

Gérald Brosseau
La Photo Du Jour
(www.gb-photodujour.com)
Sur internet depuis 1998
Helmut Jarausch via gimp-user-list
2018-07-28 12:06:52 UTC (over 5 years ago)

Error with plug-in Advanced Tone Mapping

On 07/26/2018 06:05:50 PM, Gerald Brosseau wrote:

I have always the same error with the Advanced Tone Mapping on large image ! (14903 x 5239 last attemp image size @ 300dpi)

Erreur lors de l’exécution de script-fu-advanced-tone-mapping :

Error: Procedure execution of plug-in-gauss failed on invalid input arguments:

La procédure « plug-in-gauss » a été appelée avec la valeur « 906,390000 » pour le paramètre « horizontal »

(#4, type gdouble). Cette valeur est hors-limite.

Any hint to correct this problem?

If one looks at advancedtonemapping.scm

it invokes Gimp's internal procedure plug-in-gauss which has limit of 500 for the blur radius.
I think, 500 is quite a lot.

But advancedtonemapping calls it with a blur radius of

blurAmmount*(width+height)/200

When you invoke advancedtonemapping from within Gimp the first entry is

Gauss. Blur (% of img size):

Unfortunately, the default value is 10, the minimum you can enter is 1.

and with your image you have width = 14903 height= 5239 which gives

blur_radius = blurAmmount * 20142/200 which is approximately blurAmmount*101

So, to meat the restriction imposed by plug-in-gauss you have to set the blurAmmount to 4, at most.

If you need more fine grained control, you'd have to modify the file advancedtonemapping.scm, e.g. by replacing the line

(car (gimp-drawable-height theLayer))) 200))))

by

(car (gimp-drawable-height theLayer))) 2000))))

and

SF-ADJUSTMENT _"Gauss. Blur (% of img size)" '(10 1 100 1 10 0 0)

by
SF-ADJUSTMENT _"Gauss. Blur (%o of img size)" '(10 1 100 1 10 0 0)

i.e. the entry is taken as parts per thousand.

Helmut