Fundamentally, I think the problem is with ImageSpec::default_channel_names ()  
(in src/libOpenImageIO/formatspec.cpp).  There's an assumption that if channels 
aren't named (hello, TIFF) and there's only one channel in an image, it will be 
"A" in the absence of any other information.  I dunno, maybe that's a bad 
assumption, but nobody every complained before.

oiiotool --chnames can be used after the fact to rename channels.  If you don't 
want that extra step, we could probably put a similar option in maketx directly.

Yes, we would welcome the patch you describe (or any other).

        -- lg


On Apr 2, 2013, at 12:25 AM, Matt Chambers wrote:

> Yeah, pretty much.  The input image is 1 channel, I need it to go into R, not 
> A...an internal thing.  I've poked around the code a bit but I can't tell 
> where its happening.  I'd be happy to add an option if you can point me to 
> the right place.
> 
> Also, somewhat related, my colleagues have been using (or trying to use) a 
> lot of the optimization options like monochrome-detect and opaque detect, but 
> there is actually a few other checks maketx does before enabling those 
> options.  Can I push you a patch where in verbose mode it would tell you if 
> those things were ignored because they conflicted with another option or the 
> number of channels in the source image was too high?
> 
> -Matt
> 
> 
> On Tue, Apr 2, 2013 at 1:00 PM, Larry Gritz <[email protected]> wrote:
> Sorry, I'm not 100% sure I understand the situation.  How many channels are 
> in the input image?  Just 1 channel?  And the problem is simply that the 
> resulting EXR ends up with a channel named "A" but you want it named "R"?  Or 
> am I not understanding?
> 
>       -- lg
> 
> 
> On Mar 31, 2013, at 6:08 PM, Matt Chambers wrote:
> 
>> My initial description might have been confusing.  My source is just a 
>> monochrome tiff, I need to make it an EXR texture with the data in the red 
>> channel.  I can shuffle the data in there on my own with another script, but 
>> I'd like it to work with a single maketx command.
>> 
>> 
>> On Mon, Apr 1, 2013 at 1:44 PM, Matt Chambers <[email protected]> wrote:
>> 
>> I'm using maketx on a monochrome image with alpha (all white). The resulting 
>> EXR image has all the data copied into the alpha channel. What I really need 
>> is a single channel EXR with the data in the red channel.  Is there a way to 
>> override this?
>> 
>> -Matt
>> 
>> _______________________________________________
>> Oiio-dev mailing list
>> [email protected]
>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
> 
> --
> Larry Gritz
> [email protected]
> 
> 
> 
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
> 
> 
> _______________________________________________
> Oiio-dev mailing list
> [email protected]
> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

--
Larry Gritz
[email protected]


_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to