12-28-2021, 11:14 AM
Now I passed to the second point: Porting a python2 plugin to python3, but I find a problem on creating a simple transparent layer:
It say that image is not of type Gimp.ImageType:
Why? What I do wrong?
The full code can be find here.
Code:
# ERROR add new trasparent layer
overlay_layer = Gimp.Layer.new(
image, 'hide_background',
drawable.get_width(), drawable.get_height(),
Gimp.ImageType, 100.0,
Gimp.LayerMode.NORMAL
)
overlay_layer.fill(Gimp.FillType.TRANSPARENT)
Code:
File "/home/opensuse/.var/app/org.gimp.GIMP/config/GIMP/2.99/plug-ins/add_baloon/add_baloon.py", line 114, in run
overlay_layer = Gimp.Layer.new(
TypeError: Expected a Gimp.ImageType, but got type
Why? What I do wrong?
The full code can be find here.