EXR reading: support Z channel if no Y channel
authorNikolay Polyarniy <polarnick@agisoft.com>
Wed, 2 Jun 2021 12:53:32 +0000 (15:53 +0300)
committerNikolay Polyarniy <polarnick@agisoft.com>
Wed, 2 Jun 2021 12:53:32 +0000 (15:53 +0300)
modules/imgcodecs/src/grfmt_exr.cpp

index 9667b8ca03e2e605aa118297a8b47bba8867d840..8cf4db99c5185f47536879fd58a785cab9d314a7 100644 (file)
@@ -156,6 +156,10 @@ bool  ExrDecoder::readHeader()
     else
     {
         m_green = channels.findChannel( "Y" );
+        if( !m_green )
+        {
+            m_green = channels.findChannel( "Z" ); // Distance of the front of a sample from the viewer
+        }
         if( m_green )
         {
             m_ischroma = true;