On 18/09/2010 00:33, Sven Neumann wrote:
> On Fri, 2010-09-17 at 20:48 +0200, Ofnuts wrote:
>> Hello,
>> I'm writing a plugin that takes a drawable as input for pixel values.
>> What kind of BPP can I expect? I'd say 4 and 3 are color layers with and
>> without alpha. Will I encounter 2 and 1 for grey-levels with and without
>> alpha, too?
> Well, it depends on what your procedure specifies as image types when it
> registers. The documentation says:
>    image_types is a comma separated list of image types, or actually
>    drawable types, that this procedure can deal with. Wildcards are
>    possible here, so you could say "RGB*" instead of "RGB, RGBA" or "*"
>    for all image types. If the procedure doesn't need an image to run,
>    use the empty string.
>>   I can't find a way to create a layer in grey levels (or to
>> change an existing color one to grey levels). Am I overlooking the
>> obvious or would that only apply to layer masks?
> Grayscale layers only exist in grayscale images. If you specify "GRAY"
> and/or "GRAYA" or "*", then your procedure needs to handle those
> drawable types.

I had overlooked the fact that greyscale was an attribute of the image 
and not the layer. Thanks for the reminder. With that in mind I could 
perform some more tests with greyscale and it turns out that at least 
the python interface returns 3 or 4 channels even in greyscale, so 
everything is OK. Thx for the help.

Gimp-developer mailing list

Reply via email to