Hello. I have question that not covered well in oiio documentation.
i have piece of code that read image ============================================ bool image_utils::load_image( const std::string& filepath, int& width, int& height, float*& pixels) { OIIO::ImageInput::unique_ptr in; in = OIIO::ImageInput::open(filepath); if (in) { const OIIO::ImageSpec& spec = in->spec(); width = spec.width; height = spec.height; const int image_len = width * height * IMAGE_CHANNELS_USED; pixels = (float*)malloc(sizeof(float) * image_len); if (!pixels) { return false; } if (in->read_image(0, 0, 0, IMAGE_CHANNELS_USED, OIIO::TypeDesc::FLOAT, pixels, OIIO::AutoStride, OIIO::AutoStride, OIIO::AutoStride, (*progress_callback))) { if (in->close()) { return true; } } } return false; } ============================================ it work well with default options. But i need pass specific settings to read Camera RAW images with Libraw plugin. And can't make this work. This way not working, VC show me error. ============================================ if (in) { const OIIO::ImageSpec& spec = in->spec(); width = spec.width; height = spec.height; spec.attribute("raw:ColorSpace", "raw"); const int image_len = width * height * IMAGE_CHANNELS_USED; Using spec["raw:ColorSpace"] = "raw"; ============================================ in same part of code compiled without errors but change nothing in open Using ============================================ OIIO::attribute("raw:ColorSpace", "ACES"); ============================================ inside this block or outside also do not change anything. So what the correct way to define Plugin specific attributes? Sorry, may be this is just my low skills in c++. Best regards Vlad
_______________________________________________ Oiio-dev mailing list Oiio-dev@lists.openimageio.org http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org