Skip to content

Commit

Permalink
enforce xSampling/ySampling==1 in CompositeDeepScanLine (AcademySoftw…
Browse files Browse the repository at this point in the history
…areFoundation#1209)

Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
  • Loading branch information
peterhillman authored and cary-ilm committed Jan 18, 2022
1 parent e892a7b commit 6bf0d7d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/lib/OpenEXR/ImfCompositeDeepScanLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,20 @@ CompositeDeepScanLine::setFrameBuffer(const FrameBuffer& fr)

for(FrameBuffer::ConstIterator q=fr.begin();q!=fr.end();q++)
{

//
// Frame buffer must have xSampling and ySampling set to 1
// (Sampling in FrameBuffers must match sampling in file,
// and Header::sanityCheck enforces sampling in deep files is 1)
//

if(q.slice().xSampling!=1 || q.slice().ySampling!=1)
{
THROW (IEX_NAMESPACE::ArgExc, "X and/or y subsampling factors "
"of \"" << q.name() << "\" channel in framebuffer "
"are not 1");
}

string name(q.name());
if(name=="ZBack")
{
Expand Down

0 comments on commit 6bf0d7d

Please sign in to comment.