Skip to content

Commit 11cad77

Browse files
authored
enforce xSampling/ySampling==1 in CompositeDeepScanLine (#1209)
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
1 parent db217f2 commit 11cad77

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Diff for: src/lib/OpenEXR/ImfCompositeDeepScanLine.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,20 @@ CompositeDeepScanLine::setFrameBuffer(const FrameBuffer& fr)
238238

239239
for(FrameBuffer::ConstIterator q=fr.begin();q!=fr.end();q++)
240240
{
241+
242+
//
243+
// Frame buffer must have xSampling and ySampling set to 1
244+
// (Sampling in FrameBuffers must match sampling in file,
245+
// and Header::sanityCheck enforces sampling in deep files is 1)
246+
//
247+
248+
if(q.slice().xSampling!=1 || q.slice().ySampling!=1)
249+
{
250+
THROW (IEX_NAMESPACE::ArgExc, "X and/or y subsampling factors "
251+
"of \"" << q.name() << "\" channel in framebuffer "
252+
"are not 1");
253+
}
254+
241255
string name(q.name());
242256
if(name=="ZBack")
243257
{

0 commit comments

Comments
 (0)