04-27-2023, 10:31 AM
Here's how I'd do part of your requirement:
You have to have made a selection using the Rectangle select tool, not using the crop tool.
Code:
selection, x1, y1, x2, y2 = pdb.gimp_selection_bounds(Image)
pdb.gimp_image_crop(Image, (x2-x1), (y2 - y1), x1, y1)
pdb.gimp_drawable_desaturate(Drawable, 2)
You have to have made a selection using the Rectangle select tool, not using the crop tool.