You cannot modify a channel name because the ChannelList object keeps them sorted. If you wish to rename a channel within a list, you must delete it and reinsert it with the new name, or else assemble a completely new ChannelList containing the channels the way you want.

You may find the source of the multiview utility instructive:
https://github.com/openexr/openexr/blob/master/OpenEXR/exrmultiview/makeMultiView.cpp
That reads in channels from the input(s) and writes them out with different names. You could drop a channel from the output file by making these two lines conditional:
header.channels().insert(outChanName, inChannel);
and
outFb.insert(outChanName,image.channel(outChanName).slice());



On 12/12/15 08:02, Aaron Carlisle wrote:
In the ChannelList::Iterator and ChannelList::ConsIterator name() is being defined as a const char * name () const, which means I can't change the name. Is there anyway around this? I just want to be able to change the channel name. I tried converting name into a string then back into a const char * which works, but I have significant data loss and the pixels no longer show up in the image.


_______________________________________________
Openexr-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/openexr-user

_______________________________________________
Openexr-user mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/openexr-user

Reply via email to