Hello,

First of all, thanks for this great project :)

I'm trying to read and visualize a .cr2 image into my Qt application with
OIIO.
I implemented a QImage converter which work fine for jpg and png formats.

But when I open my cr2 picture, it seems the image have a predominance of
blue channel pixels...
If I open it with "standard" windows image viewer, it seems to be good
looking.
By opening it with another "free trial" image visualization software on
windows, I could saw 2 versions of this picture:
 * the first one is the same strange blue image (marked as sRGB colorspace)
 * the second one seems to be the right one I would excpected (more like
the jpg or png ones) which is marked as AdobeRGB colorspace

As I store an ImageBuf* of this picture, I tried to switch ColorSpace
sequentially (by pressing key c) with this snippet :

std::shared_ptr<ImageBuf> ccSrc (d->mImgBuf); // color-corrected buffer
ccSrc->read(0,0,true,TypeDesc::FLOAT);
ImageBufAlgo::colorconvert(*ccSrc, *d->mImgBuf, "current",
mColorSpace.toStdString() ); // whch could be Linear, sRGB or any available
OCIO ones like AdobeRGB
std::swap(d->mImgBuf, ccSrc);

But this have not effect anymore...
Same result if I try to use oiiotool :  oiiotool <picture.cr2>
--tocolorspace Linear -o picture.png
(Note that the -o picture.CR2 doesn't work as OIIO couldn't find any
corresponding raw format to write it. Is that mean libRaw can read but not
write CR2 formats?)

This troubles is maybe due to the fact that any other ColorSpace I want to
use are not possible. The oiio error message is : Could not find ColorSapce
<anyOtherColorSapceThanLinear>...

I built OIIO with OCIO and set environement variable OCIO to
imageworks-OpenColorIO-Configs\aces_0.1.1\config.ocio.
I there anything else I should do to use ColorSapces into OIIO ?

My main question is :
Is there any way to get an ImageBuf with another corrected pixels color ?

As I'm definitilvely not an expert on the complexity of the formats/colors
format, what's happening here?

Many thanks,

Jerome
_______________________________________________
Oiio-dev mailing list
Oiio-dev@lists.openimageio.org
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to