From 746bd47ce55a153e34eeb80603e303b4581e14ca Mon Sep 17 00:00:00 2001 From: Nikolay Polyarniy Date: Wed, 2 Jun 2021 15:53:32 +0300 Subject: [PATCH] EXR reading: support Z channel if no Y channel --- modules/imgcodecs/src/grfmt_exr.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/imgcodecs/src/grfmt_exr.cpp b/modules/imgcodecs/src/grfmt_exr.cpp index 9667b8ca03..8cf4db99c5 100644 --- a/modules/imgcodecs/src/grfmt_exr.cpp +++ b/modules/imgcodecs/src/grfmt_exr.cpp @@ -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;