Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
small plugin code help
#9
(03-01-2024, 11:18 PM)gimpygirl Wrote:
(03-01-2024, 09:48 PM)Ofnuts Wrote:
(03-01-2024, 08:31 PM)gimpygirl Wrote:
  • how to delete the selection from the image, made by gimp_image_select_color?

You didn't search much, did you?



(from that point of view using Gimp in English helps a lot because the API names are quite close to the names in the English UI...)

Yes, I now see why I don't find anything
"clear" gives 0 results if you use another language! Sad
You can't even find it when using translated words...
So I think I switch gimp to English

It doesn't work if I use this for selecting red. in gimp the selected color doesn't change (i have image opened)


Code:
pdb.gimp_image_select_color(image, CHANNEL_OP_REPLACE, timg, (255,0,0))


or this


Code:
pdb.gimp_image_select_color(image, CHANNEL_OP_REPLACE, tdrawable, (255,0,0))

What parameter must be in there?
See my code in the beginning

When this line works, the foreground color here should appear as the color you put in the code, right?

Code:
pdb.gimp_image_select_color(image, CHANNEL_OP_REPLACE, tdrawable, (255,0,0))

is correct, and it puts in the selection all the pixels that match red. But that doesn't update the foreground color... (if you use the By-color selection "manually" in the UI, it doesn't update the foreground color either). What you should see instead are the marching ants around the red areas.

   
Reply


Messages In This Thread
small plugin code help - by gimpygirl - 02-29-2024, 07:21 PM
RE: small plugin code help - by Ofnuts - 02-29-2024, 11:54 PM
RE: small plugin code help - by gimpygirl - 03-01-2024, 12:25 AM
RE: small plugin code help - by Ofnuts - 03-01-2024, 08:02 AM
RE: small plugin code help - by gimpygirl - 03-01-2024, 08:31 PM
RE: small plugin code help - by Ofnuts - 03-01-2024, 09:48 PM
RE: small plugin code help - by gimpygirl - 03-01-2024, 11:18 PM
RE: small plugin code help - by Ofnuts - 03-02-2024, 01:41 AM
RE: small plugin code help - by gimpygirl - 03-02-2024, 03:35 AM
RE: small plugin code help - by Ofnuts - 03-02-2024, 09:10 AM
RE: small plugin code help - by gimpygirl - 03-02-2024, 06:56 PM
RE: small plugin code help - by Ofnuts - 03-01-2024, 09:41 PM
RE: small plugin code help - by MrsP-from-C - 03-02-2024, 07:56 PM
RE: small plugin code help - by Ofnuts - 03-02-2024, 08:58 PM
RE: small plugin code help - by gimpygirl - 03-02-2024, 11:05 PM
RE: small plugin code help - by Ofnuts - 03-03-2024, 12:35 AM
RE: small plugin code help - by gimpygirl - 03-03-2024, 01:42 AM
RE: small plugin code help - by Ofnuts - 03-03-2024, 05:09 PM

Forum Jump: