Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the api way not pdb
#4
Can't think of a better way than is_empty = pdb.gimp_selection_is_empty(image) or non_empty, x1, y1, x2, y2 = pdb.gimp_selection_bounds(image) but both should be quick. You would use that only once anyway, if you know what your plugin code is doing with the selection.

Looking at your plugin, a layer with the knit pattern over the original image blurred with Filter > Blur > Pixellize of adequate size would do the trick (yes, pixellize is the average and not the median...). And if you take the pattern size (width, height, bpp = pdb.gimp_pattern_get_info(name)you can do a plugin that auto-adapts to the pattern used (just pixellize to that size).
Reply


Messages In This Thread
What is the api way not pdb - by ttt - 11-11-2024, 11:33 AM
RE: What is the api way not pdb - by PixLab - 11-11-2024, 12:34 PM
RE: What is the api way not pdb - by ttt - 11-11-2024, 02:46 PM
RE: What is the api way not pdb - by PixLab - 11-13-2024, 06:03 AM
RE: What is the api way not pdb - by Ofnuts - 11-11-2024, 03:14 PM
RE: What is the api way not pdb - by ttt - 11-11-2024, 03:18 PM
RE: What is the api way not pdb - by ttt - 11-11-2024, 04:37 PM
RE: What is the api way not pdb - by Ofnuts - 11-11-2024, 04:54 PM
RE: What is the api way not pdb - by ttt - 11-11-2024, 06:10 PM
RE: What is the api way not pdb - by Ofnuts - 11-11-2024, 09:34 PM
RE: What is the api way not pdb - by trandoductin - 11-12-2024, 10:51 PM

Forum Jump: