AWS Thinkbox Discussion Forums

Feature Request: Image.Copy() - with "add channel" option

Hi
Please consider adding an “Image.AddChannel(“mychannel”)” method.
Or maybe “Image.Copy()” could have an “add-copied-channel(s)-if-they’re-not-already-present-in-target-image” option.

Cheers
Bonsak

Thank you for your feedback! I will add this to our wish list.

Currently, to add a channel, you can use Image.SetChannel( channel, value ). If the channel does not already exist, Image.SetChannel() will create it for you. For example:[code]img = Draft.Image.CreateImage( 640, 480 )
img.GetChannelNames()

[‘A’, ‘B’, ‘G’, ‘R’]

img.SetChannel( ‘mychannel’, 0 )
img.GetChannelNames()

[‘A’, ‘B’, ‘G’, ‘R’, ‘mychannel’][/code]

Ok! Didn’t know SetChannel could do that :slight_smile: No need for an AddChannel function then.
Would still be great with an add functiion in image.Copy() though.

Cheers
Bonsak

Privacy | Site terms | Cookie preferences