11-11-2024, 09:34 PM
(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