'looking for syntax example of 'gimp.Channel(image,name,width,height,opacity,color)'
No problems with 'pdb.gimp_channel_new(image, width, height, name, opacity, color)'
but I cannot get the syntax for '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
>>>
thanks!
Solution 1:[1]
The color should be a real RGB color object:
import gimpcolor
ch=gimp.Channel(image,'name',800,600,50,gimpcolor.RGB(0,0,0))
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | xenoid |
