Sorry, just for completeness, the C++ version:
ImageSpec cfg;
cfg.attribute ("raw:ColorSpace", "XYZ);
ImageBuf buf ("myrawfile.cr2", 0 /*subimage*/, 0 /*miplevel*/,
NULL /*imagecache*/, &cfg /*config*/);
> On Sep 14, 2016, at 10:17 PM, Larry Gritz <[email protected]> wrote:
>
> On command line for oiiotool, you can set these configuration switches with
> --iconfig, which is a lot like --attrib except that it is setting up one of
> those configuration ImageSpec's for the next file that's input. Like this:
>
> oiiotool --iconfig raw:ColorSpace XYZ myrawfile.cr2
>
> From Python, the way you do this is like:
>
> cfg = oiio.ImageSpec()
> cfg.attribute ("raw:ColorSpace", "XYZ")
> buf = oiio.ImageBuf ()
> buf.reset ("myrawfile.cr2", config=cfg)
> # Sorry, I know that's slightly awkward, but there's not currently a
> one-line way to
> # create a new ImageBuf and set up the config in one step. But from this
> point on,
> # you can just carry on with the rest of your ImageBuf operations, as
> usual...
>
>
>
>
>> On Sep 11, 2016, at 11:40 PM, Haarm-Pieter Duiker <[email protected]
>> <mailto:[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
>>
>> <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]
>> <mailto:[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] <mailto:[email protected]>
>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>> <http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org>
>>
>>
>> _______________________________________________
>> Oiio-dev mailing list
>> [email protected] <mailto:[email protected]>
>> http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
>
> --
> Larry Gritz
> [email protected] <mailto:[email protected]>
>
>
> _______________________________________________
> 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