Hello! I've recently started scripting with gimp and I've ran into a problem with posterize. I believe the issue is with how I am trying to implement the blending option. Does anyone have experience with automating the posturize tool with a blending option enabled?
I've found:
gimp_edit_blend()
gimp_context_set_paint_mode()
gimp_layer_set_mode()
Removed Alpha layer, manually using the posterize tool with 2 levels an color erase blending
With my tool set to 2 levels using gimp_edit_blend
It's quite possible I'm completely missing how the posterize tool accomplishes the blending. So far the results I've been getting are as if I had no blending mode selected (Replace/Normal). I'm aiming to use the Color Erase paint mode, but I'm running out of ideas what I'm doing wrong.
Thank you for reading.
I've found:
gimp_edit_blend()
gimp_context_set_paint_mode()
gimp_layer_set_mode()
Removed Alpha layer, manually using the posterize tool with 2 levels an color erase blending
With my tool set to 2 levels using gimp_edit_blend
Code:
srclayer = image.layers[0]
pdb.gimp_image_insert_layer(image, pdb.gimp_layer_copy(srclayer, 0), None, -1)
pdb.gimp_drawable_posterize(image.layers[0], amount)
pdb.gimp_context_set_paint_mode(57)
image.layers[0] = blendColorErase(image.layers[0])
It's quite possible I'm completely missing how the posterize tool accomplishes the blending. So far the results I've been getting are as if I had no blending mode selected (Replace/Normal). I'm aiming to use the Color Erase paint mode, but I'm running out of ideas what I'm doing wrong.
Thank you for reading.