寻找 'gimp.Channel(image,name,width,height,opacity,color)' 的语法示例
looking for syntax example of 'gimp.Channel(image,name,width,height,opacity,color)'
'pdb.gimp_channel_new(image, width, height, name, opacity, color)'
没问题
但我无法获得 'gimp.Channel(image,name,width,height,opacity,color)'
的语法
>>> image=gimp.image_list()[0]
>>> channel = pdb.gimp_channel_new(image,800,600,'name',50,(0,0,0))
>>> ch=gimp.Channel(image,'name',800,600,50,(0,0,0))
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: type mismatch
>>>
谢谢!
颜色应该是真正的 RGB 颜色对象:
import gimpcolor
ch=gimp.Channel(image,'name',800,600,50,gimpcolor.RGB(0,0,0))
'pdb.gimp_channel_new(image, width, height, name, opacity, color)'
没问题
但我无法获得 'gimp.Channel(image,name,width,height,opacity,color)'
>>> image=gimp.image_list()[0]
>>> channel = pdb.gimp_channel_new(image,800,600,'name',50,(0,0,0))
>>> ch=gimp.Channel(image,'name',800,600,50,(0,0,0))
Traceback (most recent call last):
File "<input>", line 1, in <module>
TypeError: type mismatch
>>>
谢谢!
颜色应该是真正的 RGB 颜色对象:
import gimpcolor
ch=gimp.Channel(image,'name',800,600,50,gimpcolor.RGB(0,0,0))