Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyGimp;Change color;Bucket fill selected
#1
Hi. Trying to change the color of the bucket fill function in python gimp, but due to my inexperience with python and the structure between gimp and python i have not been successful.
Information im looking for is:
  How to swap the pre-selected colors
  How to set new color
  How to fill and selected area
  How to select and area

All of which needs to take place in pyGimp

The bellow code is what i have so far, but the result is what i expect.
Expected result should be an grid (almost like a chess board) where pyGimp color individual squares in one of the two colors (foreground and background)

#Select and square
pdb.gimp_rect_select(img, gPosX+pX, gPosY+pY, wid, hig, CHANNEL_OP_REPLACE, False, 0.0)
#Fill the square
draw.fill(FILL_FOREGROUND)
Reply


Messages In This Thread
PyGimp;Change color;Bucket fill selected - by FloppaDisk - 03-15-2020, 07:08 AM

Forum Jump: