Hi, i am having an issue with a script i am working on. below is an MWE to illustrate the issue (apparently one cannot attach .py, .txt, ... files here?).
the problem arises when calling this (or with "#00000000")
image.select_color(Gimp.ChannelOps.REPLACE, layer, Gegl.Color.new("transparent"))
it selects all transparent pixels except black. so it seems as if it is considering all other colors to be transparent, as demonstrated here:

the context settings can be seen in the image on the left. what am i doing wrong? is this a bug?
i am using the following:
gimp 3.0.6 flatpak
fedora 43
intel chipset
32gb ram
thank you all in advance!
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import gi
gi.require_version('Gimp', '3.0')
from gi.repository import Gimp
gi.require_version('GimpUi', '3.0')
from gi.repository import GimpUi
from gi.repository import GObject, GLib, Gtk, Gio, Gegl
import sys, os
def issue_demo(procedure, run_mode, image, drawables, config, run_data):
image.undo_group_start()
for layer in image.get_selected_layers():
image.select_color(Gimp.ChannelOps.REPLACE, layer, Gegl.Color.new("transparent"))
return
image.undo_group_end()
Gimp.displays_flush()
return
class IssueDemoPlugIn(Gimp.PlugIn):
def do_query_procedures(self):
return ["issue-demo"]
def do_create_procedure(self, name):
if name != "issue-demo":
return None
procedure = Gimp.ImageProcedure.new(self,
name,
Gimp.PDBProcType.PLUGIN,
issue_demo,
None)
procedure.set_image_types("RGB*")
procedure.set_sensitivity_mask(Gimp.ProcedureSensitivityMask.ALWAYS)
procedure.set_menu_label("issue demo")
procedure.set_attribution("Ingegneus", "Ingegneus", "2025")
procedure.add_menu_path("<Image>/Filters")
procedure.set_documentation(
"issue demo",
"issue demo",
None)
return procedure
# Plugin entry point
Gimp.main(IssueDemoPlugIn.__gtype__, sys.argv)