Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is the api way not pdb
#9
(11-11-2024, 06:10 PM)trandoductin Wrote:
(11-11-2024, 04:54 PM)Ofnuts Wrote:
(11-11-2024, 04:37 PM)ttt Wrote: I thought if pixelize can't do shape then i can at least use it to approximate colors and dodge using a bunch of repeated histogram calls.
So now my code is 10% faster because i use get_pixel to get the pixelized color.

You can add a layer mask and fill it with the V-shape pattern.

Not sure what you mean because the V-shapes are all touching each other to fill the image.

get_pixel() is a major performance problem.

Other way: Create the selection shape only once, then shift the selection mask:


channel = pdb.gimp_selection_save(image) # done once
for whatever_loop:
    pdb.gimp_selection_none(image)
    pdb.gimp_drawable_offset(channel, True, OFFSET_WRAP_AROUND, 100,200)
    pdb.gimp_image_select_item(image,CHANNEL_OP_REPLACE,channel)
    # do whatever with new selection
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 - Yesterday, 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: