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);

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

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?

Akihiro Yamasaki
Oiio-dev mailing list

Reply via email to