After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 773774 - plugin-autococrop-layer autocrops the wrong layer
plugin-autococrop-layer autocrops the wrong layer
Status: RESOLVED WONTFIX
Product: GIMP
Classification: Other
Component: Script-Fu
2.8.18
Other Linux
: Normal normal
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2016-11-01 11:28 UTC by Ofnuts
Modified: 2016-11-01 18:20 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ofnuts 2016-11-01 11:28:02 UTC
Create an image with two layers (for instance dark spots on a white background).

Make the top one the active layer

In the python console, enter:

image=gimp.image_list()[0]
pdb.plug_in_autocrop_layer(image,image.layers[1])

And notice how the top layer has been cropped around the position of the spot on the bottom layer. This works the other way around, make the bottom layer active, and use: 

pdb.plug_in_autocrop_layer(image,image.layers[0])

And the bottom layer will be cropped around the spot of the top layer.

In other words, the layer passed as argument is used to compute the crop, but the the active layer is the one that gets cropped.

This must be a regression, I have a script to crop several layers (written for 2.6) that used to work...
Comment 1 Michael Natterer 2016-11-01 18:04:46 UTC
Yes this is entirely brain dead, but it's how the plug-in is
documented to work. We cannot change that. The plug-in is gone
in master, but we still need a replacement API for plug-ins.
Comment 2 Ofnuts 2016-11-01 18:20:09 UTC
OK... will be fixing my scripts then...