openexr-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openexr-user] Change Channel names


From: Peter Hillman
Subject: Re: [Openexr-user] Change Channel names
Date: Mon, 14 Dec 2015 14:15:46 +1300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

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
address@hidden
https://lists.nongnu.org/mailman/listinfo/openexr-user


reply via email to

[Prev in Thread] Current Thread [Next in Thread]