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

call plug-in-curve-bend

This discussion is connected to the gimp-developer-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.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

call plug-in-curve-bend Michael Hölzen 20 Apr 13:08
  call plug-in-curve-bend Sven Neumann 21 Apr 14:43
   call plug-in-curve-bend Michael Hölzen 21 Apr 16:48
Michael Hölzen
2008-04-20 13:08:55 UTC (about 17 years ago)

call plug-in-curve-bend

Hello everybody,
i'm currently writing a little python plugin which calls the plug-in-curve-bend.
Purpose of my plugin is to let the user nominate a channel with a shape to which a
selection shall be bent to.
I take this shape and hand over 256 generated y-values (each lower and upper values) to the curve-bend-plug-in with curve type freehand. pdb.plug_in_curve_bend(image, drawable, rotation, smoothing, antialias, work-on-copy, curve-type, argc-upper-point-x, upper-point-x, argc-upper-point-y, upper-point-y, argc-lower-point-x, lower-point-x, argc-lower-point-y, lower-point-y, argc-upper-val-y, upper-val-y, argc-lower-val-y, lower-val-y)
Unfortunately the lower-vals are ignored. No bending of the lower part occurs. Only the upper-vals work fine. But the generated data are correct. To test that my plugin has written them parallel into a curve_bend.points - file. Using this file with Filters -> Distorts -> Curve Bend (Load the curves from a file) works in the expected way: Both upper-vals and lower-vals are used to bend the upper and the lower part of the selection corresponding to the respective values. Has anybody a hint what possibly goes wrong calling the plug-in-curve-bend?

Regards

Michael

Sven Neumann
2008-04-21 14:43:48 UTC (about 17 years ago)

call plug-in-curve-bend

Hi,

On Sun, 2008-04-20 at 13:08 +0200, Michael Hölzen wrote:

I take this shape and hand over 256 generated y-values (each lower and upper values) to the curve-bend-plug-in with curve type freehand. pdb.plug_in_curve_bend(image, drawable, rotation, smoothing, antialias, work-on-copy, curve-type, argc-upper-point-x, upper-point-x, argc-upper-point-y, upper-point-y, argc-lower-point-x, lower-point-x, argc-lower-point-y, lower-point-y, argc-upper-val-y, upper-val-y, argc-lower-val-y, lower-val-y)
Unfortunately the lower-vals are ignored. No bending of the lower part occurs. Only the upper-vals work fine.

Looks like a simple bug in the curve-bend plug-in. Below is a patch that should fix it. I will apply this to both branches...

Index: plug-ins/common/curve-bend.c =================================================================== --- plug-ins/common/curve-bend.c (revision 25501) +++ plug-ins/common/curve-bend.c (working copy) @@ -745,7 +745,7 @@ run (const gchar *name, p_copy_yval (cd, OUTLINE_UPPER, param[16].data.d_int32, param[17].data.d_int8array); - p_copy_yval (cd, OUTLINE_UPPER, + p_copy_yval (cd, OUTLINE_LOWER, param[18].data.d_int32, param[19].data.d_int8array); }

Sven

Michael Hölzen
2008-04-21 16:48:56 UTC (about 17 years ago)

call plug-in-curve-bend

Sven Neumann schrieb:

Hi,
Looks like a simple bug in the curve-bend plug-in. Below is a patch that should fix it. I will apply this to both branches...

Index: plug-ins/common/curve-bend.c =================================================================== --- plug-ins/common/curve-bend.c (revision 25501) +++ plug-ins/common/curve-bend.c (working copy) @@ -745,7 +745,7 @@ run (const gchar *name, p_copy_yval (cd, OUTLINE_UPPER, param[16].data.d_int32, param[17].data.d_int8array); - p_copy_yval (cd, OUTLINE_UPPER, + p_copy_yval (cd, OUTLINE_LOWER, param[18].data.d_int32, param[19].data.d_int8array); }

Sven

Thanks a lot for that fast solution!

Regards

Michael