Skip to main content
Participating Frequently
November 18, 2008
Question

Change in EXR open from CS2 to CS3 can this be fixed?

  • November 18, 2008
  • 166 replies
  • 259016 views
It seems the monkeys have been at the file formats again...!

Open an exr with an alpha in CS2 and the image displays normally and the alpha is retained.

Open an exr with an alpha in CS3 and the alpha channel is applied to the transparency and then lost... which is really STUPID considering you might apply 0 alpha values to parts of the image you retain visually, as you might just want to use the alpha to drive an effect and not just be myopic and think it's just for transparency.

So, can this be fixed? I can't see any info on it?

Will CS2 non intel plugin work on an intel system in CS3

If not, effectively PS is useless for exr work for us.

Or is this fixed in CS4?
    This topic has been closed for replies.

    166 replies

    Chris Cox
    Legend
    November 25, 2008
    The color channels may be altered slightly due to un-multiplying and re-multiplying (remember: Photoshop does not use premultiplication, so we have to un-multiply to use the image). So, the least significant bits may change.
    Participating Frequently
    November 25, 2008
    Chris, and Progress,
    I guess I don't understand what Photoshop does with OpenEXR's A channel.
    When you open an EXR image with RGB and A channels in PS, and then
    immediately save the image, will the new file not be identical to the original?
    Chris Cox
    Legend
    November 25, 2008
    Progress - read Florian's statement and the EXR spec. again. His "A" is defined as transparency. The explanation is just confused by referring to it as alpha (which could be any additional channel, not just transparency). But the math, and the requirement for premultiplication means it must be transparency. That is the only interpretation available, and the interpretation that Photoshop uses.

    Yes, premultiplied transparency does lose image data -- but that is the way the EXR format is defined. Your "nuking" happened when you saved the EXR file, because it has to be premultiplied (transparent areas go to zero in the color channels).

    The only change Photoshop makes is to un-multiply the data, because Photoshop does not work with premultiplied data. The data is re-multiplied when you save the file, resulting in no net change to the file data. Transparent EXR files round trip just fine through Photoshop, as far as I can test with files from ILM, or those that I have created.

    If you wish to have an arbitrary alpha channel (one not treated as transparency) in the EXR format, you will need a third party plugin. EXR does allow for extra channels, but the Photoshop EXR plugin does not support them yet.
    Participating Frequently
    November 24, 2008
    Chris, I think your wrong on this. I think that's backed up by TD's from Pixar and the originator from ILM posting as such. It's being interpreted in the wrong manner, ie assuming transparency = alpha.

    Exr doesn't have transparency in it's spec. Its RGB+A. But PS is presuming that A = Transparency. Not only that, it's applying it and deleting it before the file is viewed, which means when it's used in pre-multiplied it's actually taking away image data that can't be put back.

    It's not done with any other format, and it's not done with tga now it's been changed back. It's the very same thing.

    PS is making irreversible changes to the document when it's opened. It doesn't matter even if later you define the alpha as the transparency, it's nuking the image that's the problem. Pre-multiplied means that for any pixel value except 0 in the alpha, the alpha will remove some of the image + the background it's "transparent" against.

    If I have an alpha, I can choose to apply it to the image to make transparency as I wish.

    It's impossible to rebuild an Exr back to what it was once PS has got hold of it, because by applying the alpha as transparency it has deleted RGB image data.

    A 1/2 way house would be to have it as a layer mask... at least then both your transparency interpretation and the image data is retained and the user can have the choice.
    Chris Cox
    Legend
    November 24, 2008
    Guido - Photoshop DOES preserve the transparency/opacity data from EXR files, exactly as specified by the file format spec. The only exception was in CS2 when Photoshop did not support 32 bit transparency, in CS2 we just read the transparency channel in as an alpha channel.

    If you are trying to use the EXR "A" channel for something other than transparency - STOP. The file format does not allow that. You can add other named channels in EXR, but Photoshop doesn't yet support them.
    Chris Cox
    Legend
    November 24, 2008
    Alpha Channel - any extra channel beyond the color channels. This has nothing to do with transparency (except as a historical footnote). Anything can be stored in an alpha channel, it does not have to be related to the color channels at all. You can have many alpha channels in an image.

    Transparency - a subset of extra channels, closely related to the color channels, with special meaning. Can also be called Opacity (transparency and opacity are the reverse of one another). You can only have one transparency channel in an image. This may be premultiplied with the color data, depending on the file format specification.
    Chris Cox
    Legend
    November 24, 2008
    Florian - you are confusing the terms alpha (any extra channel) with transparency (what you called alpha). Photoshop reads and writes OpenEXR files exactly as you stated - with premultiplied transparency.

    Apparently some users thought EXR supported general alpha channels and are now confused when those channels are treated as transparency (as the file format specifies).
    Participating Frequently
    November 22, 2008
    For us, it's not that it doesn't behave the same, it's that you often dont want it to, and alpha isn't always transparency. We might use it as a matte or z-buffer.

    It looks like with another hoop jump, we can strip out the alpha before PS gets its sticky mitts on it and assumes it's an alpha for transparency before we tell it wether it is or not.
    Participating Frequently
    November 21, 2008
    Great read. Thank you.
    Participating Frequently
    November 21, 2008
    Hi Chris,

    with OpenEXR it is standard practice to interpret the "A"
    channel as pre-multiplied alpha. Compositing a foreground
    layer over a background layer is correctly done like this
    (see http://www.openexr.com/TechnicalIntroduction.pdf, page 5):

    composite = foreground + (1-alpha) * background

    Programs that read and write OpenEXR files generally adhere
    to this convention. I don't know how transparency works in
    Photoshop; your message suggests that PS transparency is not
    the same as alpha. This would imply that PS should not treat
    OpenEXR's alpha channel as if it was transparency. Of course,
    PS could add transparency channels as needed when it writes
    OpenEXR files.

    Florian