Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to test if there is a selection.
#5
(10-02-2020, 10:55 PM)david Wrote: Many thanks Kevin.
My problem this time was with the English! gimp_selection_is_empty implied to me that a selection existed, but contained nothing.
gimp_no_selection or gimp_selection_absent would be more self-explanatory!
david.

So the call is appropriately named, because technically the selection is always here... image.selection or pdb.gimp_image_get_selection(image) will always return a channel, but you would have to use the histogram calls to determine if there are any non-zero pixels in it.
Reply


Messages In This Thread
How to test if there is a selection. - by david - 10-02-2020, 03:37 PM
RE: How to test if there is a selection. - by Ofnuts - 10-03-2020, 05:44 AM

Forum Jump: