You are here

One colorpicture to three bitmaps- one for each color channel, wanted

I need to analyse some pictures taken with light from three diodes-one blue, one red and one green. Now I look at each channel using the channel mixer, killing two channels at the time and then saving the result as a grey scale bitmap, which is further analysed in a labview program.
It would be nice if there were a script which I just could apply on a RGB picture and it would produce three grey scale bitmap pictures, representing each color channel. Does this exist? If not, would it be complicated for me to create one, never having done a single script-fu before and not being too experienced in programing?

Try Colour->Components->Decompose and pick RGB

-Rob A>

I interpret the request to mean: save the channels in separate image files. Color>Components>Decompose>RGB separates the channels into layers, but you still need more clicks to copy the layers into separate images?

If so, this is another case where scripting a series of menu clicks would be helpful. In other words, Gimp needs a scripting facility that is much closer to the user than a programming language (although less powerful.) Maybe there exists a macro or shortcut key "extension" or "plugin" or "applet" but I don't know of it, and as far as I know, they have usability problems also.

plashless, off banks of noon

Decompose provides the option to create separate images.

@pontus,
You may also be interested in a script I wrote which decomposes the active layer into its four components (red, green, blue, and alpha), generating four new layers within the same image (replacing the original layer) and constructed such that the composited result of the four new layers is equivalent to the original layer.

This is accomplished by placing the individual components (red, green, blue, and alpha) of the decomposition as layermasks to appropriately colored layers. The individual channels can be viewed, disabled, and edited using the commands under the "Layer->Mask" submenu (quick-key assignments recommended).

Here is the script:
http://www.flashingtwelve.brickfilms.com/GIMP/Scripts/sg-decomp-RGBA.scm

Thanks guys, that saved me a lot of work. Sorry for being lazy and not reading the manual. Saulgoode, I also downloaded your script for saving all layers. Thank you for that, it is great.
Cheers

Oops, Color>Components>Decompose CAN decompose into images.

It is non-intuitive though, that is, a flaw in the GUI: the checkbox "Decompose to Layers" should be a set of radio buttons, with the other button saying "Decompose to Images". A nieve user (like me) can't tell what the alternative to "Decompose to Layers" is. (Or it could be a Combobox GUI widget with the two alternatives.)

plashless, off banks of noon

This is one more post that points to the benefits of being able to view the individual color channels in grayscale. In PS, it's my go-to method to evaluate how much damage to color fidelity a given adjustment is causing. Nearly impossible for my eyes to evaluate that with the color pollution present in the channel views today. Personally, I have yet to find a situation where viewing the channels in color have provided any benefit at all.

Both RGB and Greyscale image have alpha channel. When the alpha channel layer is 0. It is transparent but when the layer have maximal of 255. It is opaque and you cannot see it.

Subscribe to Comments for "One colorpicture to three bitmaps- one for each color channel, wanted"