Re: [Gimp-developer] Gracefully handling BPP in a python plugin

2010-09-19 Thread Sven Neumann
On Sun, 2010-09-19 at 21:36 +0200, Ofnuts wrote: > On 19/09/2010 20:44, Sven Neumann wrote: > > > > > First of all, why are you using the PDB directly instead of using the > > Python objects? > > Ignorance, defiance, and laziness. The doc for the Image class > (http://www.gimp.org/docs/python/in

Re: [Gimp-developer] Gracefully handling BPP in a python plugin

2010-09-19 Thread Ofnuts
On 19/09/2010 20:44, Sven Neumann wrote: > > First of all, why are you using the PDB directly instead of using the > Python objects? Ignorance, defiance, and laziness. The doc for the Image class (http://www.gimp.org/docs/python/index.html) has around 20 methods. Compare to the number of gimp_i

Re: [Gimp-developer] Gracefully handling BPP in a python plugin

2010-09-19 Thread Sven Neumann
On Sat, 2010-09-18 at 21:55 +0200, Ofnuts wrote: > > 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 o

Re: [Gimp-developer] Gracefully handling BPP in a python plugin

2010-09-18 Thread Ofnuts
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 turn

Re: [Gimp-developer] Gracefully handling BPP in a python plugin

2010-09-18 Thread Sven Neumann
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 ret

Re: [Gimp-developer] Gracefully handling BPP in a python plugin

2010-09-17 Thread Ofnuts
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

Re: [Gimp-developer] Gracefully handling BPP in a python plugin

2010-09-17 Thread Sven Neumann
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?

[Gimp-developer] Gracefully handling BPP in a python plugin

2010-09-17 Thread Ofnuts
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? I can't find a way to create a layer in grey levels (or to