Reorder

Function
The Reorder operator lets you shuffle channels. The argument to this command specifies the new order. A channel can be copied to several different channels. The letter "l" refers to the luminance pseudo-channel which can be substituted in place of the rgba. If an expression is on a channel that doesn't exist, Shake creates it. You can use the z channel as well, for example,

shake -reorder zzzz

would place the z channel into the rgba channels for viewing.

To copy a channel from another image, use Copy.

Parameters
Type
Defaults
Function
channels
string
"rgba"

This indicates the new channel assignment. You can use any of

r set this channel's pixels to red channel's values
g set this channel's pixels to green channel's values
b set this channel's pixels to blue channel's values
a set this channel's pixels to alpha channel's values
z set this channel's pixels to Z channel's values
l set this channel's pixels to luminance of rgb
0 set this channel's pixels to 0
1 set this channel's pixels to 1
n remove this channel from the active channels

 


Synopsis

image Reorder( image, const char * channels );


Script

image = Reorder( image, "channels");


Command Line

shake -reorder channels


Examples:

To copy the luminance into the matte channel:

-reorder rgbl

To copy the red channel to all 3 color channels, leaving the alpha:

-reorder rrra

To remove the alpha channel:

-reorder rgbn

See Also
Copy, ColorX