Hi there,

I'm running into the alpha channel issue. I want to read an image as
unassociated alpha. So I used following code:

ImageSpec config;
config.attribute("oiio:UnassociatedAlpha", 1);
ImageInput *image_in = ImageInput::open(filename, &config);
image_in->read_image(...);

But I noticed that some files are read as associated alpha image. I looked
into it and found the following solution:

// After above code
if (image_in->spec().get_int_attribute("oiio:UnassociatedAlpha") != 1) {
  // convert associated alpha image to unassociated alpha
  deassociateAlpha(...);
}

Now some format (associated alpha tiff) works correctly, but some format
(psd, sgi) is still wrong. I expected the ImageSpec always has the
"oiio::UnassociatedAlpha" attribute if read_image returns
unassociated alpha image.

Is it an issue of psd/sgi input? Or is there any misunderstanding?

Thanks,
Akihiro Yamasaki
_______________________________________________
Oiio-dev mailing list
Oiio-dev@lists.openimageio.org
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

Reply via email to