I was able to use a custom ImageSpec with ImageInput's open method to set the gamut. If you need to use any of the ImageBuf algorithms, you can transfer pixel data to an ImageBuf. If not, you could just write the data out.
Example code here: https://github.com/hpd/general/blob/master/hdr/python/mkhdr.py#L104 HP On Mon, Sep 12, 2016 at 1:50 PM, Alex Fry <[email protected]> wrote: > Right now I'm just using oiiotool via the command line. But I'm fine going > down the python route if that's what's necessary. > > So Larry, you think it is possible with the current code? > > If not, can oiiotool take input from stdin coming from dcraw? > > -Alex > On Tue., 13 Sep. 2016 at 2:58 am, Larry Gritz <[email protected]> wrote: > >> Python: it depends on the interface you are using to read the files -- >> raw ImageInput, or using ImageBuf? >> >> >> On Sep 11, 2016, at 11:40 PM, Haarm-Pieter Duiker < >> [email protected]> wrote: >> >> Hey Alex, >> >> I've been looking at this code as well recently. If you check out the >> RawInput::open method here: >> https://github.com/OpenImageIO/oiio/blob/master/ >> src/raw.imageio/rawinput.cpp#L139 >> it looks like a metadata field named "raw:ColorSpace" on the secondary >> 'config' ImageSpec will drive the colorspace that libRaw will use when >> delivering the raw data. >> >> If you figure out how to set that up on through Python, it would be great >> to see a working example. >> >> HP >> >> >> >> >> On Sat, Sep 10, 2016 at 7:33 PM, Alex Fry <[email protected]> wrote: >> >>> Hey guys >>> >>> I'm playing around a little bit with converting RAW files to ACES EXRs. >>> >>> Ideally id like to be able to do this entirely with oiiotool (or via >>> openimageio within python) >>> >>> Right now I use dcraw to go to a 16bit linear tiff in XYZ space (dcraw >>> -4 -o 5 -T ), then flip from XYZ to ACES using Nuke or oiiotool >>> >>> Basically I'm treating dcraw's various input camera matrices as part 1 >>> of a rough and ready IDT. >>> >>> Is there a way to tell libraw within olio to debayer to straight linear >>> XYZ? >>> >>> Thanks >>> Alex >>> >>> _______________________________________________ >>> 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 >> > > _______________________________________________ > 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
