> It's not just "slightly related" -- yesterday I implemented exactly what you 
> requested, and in so doing
> (needing to specify channels) realized the discrepancy between the way 
> ImageInput specifies channel
> ranges and how ROI and ImageBuf do it, leading to my email.

Awesome! Thanks!

> OK, if there are two common use cases (all channels, and one channel), then 
> what would you think
> of my specifying that the function retrieves a minimum of one channel?  That 
> way, retrieving channel
> 2 only would have previously >specified firstchan=2, nchans=1, and the new 
> interpretation
> chbegin=2, chend=1 falls into the "1 channel minimum" case and also works the 
> same as before.

That seems reasonable if those are indeed the only use cases in existence, but 
if there are other use cases then they'll be tripped up. Would the other option 
be to just accept that it's an API change, and make sure that invalid inputs 
(chend <= chbegin) throw an exception or print some sort of warning so people 
can catch it and adjust their code as necessary? As I said originally, for my 
small use of OIIO I'm more than happy to just adjust my code, so other people's 
opinions would be much more important than mine...

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

Reply via email to