[Gimp-developer] Gracefully handling BPP in a python plugin
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 change an existing color one to grey levels). Am I overlooking the obvious or would that only apply to layer masks? I'm actually using the drawable pixels fro set the foreground color for various operation (selection stroke and bucket fill). Is there a general function to convert the pixel values betwen drawables of different depth? or can I put in gimp_context_set_foreground() whatever I get from gimp_drawable_get_pixel()? ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
[Gimp-developer] Interview GIMP maintainers on FLOSS Weekly?
I like to listen to the podcast FLOSS Weekly, part of Leo Laporte's TWiT network. I emailed the show host, Randal Schwartz, to ask him if he could do a show on GIMP. He asked me if I could track down GIMP's project owners and ask them to email him. After fruitlessly searching the web for a way to contact Michael Natterer or Sven Neumann, I have resorted to this mailing list. If necessary, I'm sure Randal would be willing to interview someone besides Michael or Sven, as long as they have good GIMP developer credentials. Can anybody on this list help me get in contact with one of the project owners? Basically I just need to email them to give them Randal's email address, and if they are interested they can email him to setup the interview. This is the URL for the podcast: http://twit.tv/FLOSS Thanks. ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Gracefully handling BPP in a python plugin
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. Sven ___ Gimp-developer mailing list Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Re: [Gimp-developer] Gracefully handling BPP in a python plugin
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 Gimp-developer@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer