On 18/09/2010 19:23, Sven Neumann wrote:
> On Sat, 2010-09-18 at 01:51 +0200, Ofnuts wrote:
>> 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.
> If that is the case, then there is a bug somewhere. But I very much
> doubt that gray-scale layers are reported to have 3 or channels. Perhaps
> you can show us some example code?

Hmm. Wrote some fresh code to demonstrate this and of course it behaves 
as you say. Grumble, grumble. Back to the drawing board. Thx for the 
heads up.

PS: well, something fishy still.  Creating a greyscale layer in a RGB 
image works, and yields a 1BPP layer:

image_color = pdb.gimp_image_new(100,100,0)
print pdb.gimp_drawable_get_pixel(layer_grayscale,0,0)

This a moot point right now because I'm not creating images & layers 
that way, but you said this couldn't happen?

Gimp-developer mailing list

Reply via email to