Skip to content

Commit

Permalink
deep_merge: add check for the inputs to have the same channels (1675)
Browse files Browse the repository at this point in the history
  • Loading branch information
lgritz committed Apr 20, 2017
1 parent f3cd9cf commit 51d6ceb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libOpenImageIO/imagebufalgo_deep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ ImageBufAlgo::deep_merge (ImageBuf &dst, const ImageBuf &A,
dst.error ("deep_merge can only be performed on deep images");
return false;
}
if (! IBAprep (roi, &dst, &A, &B, NULL, IBAprep_SUPPORT_DEEP))
if (! IBAprep (roi, &dst, &A, &B, NULL,
IBAprep_SUPPORT_DEEP | IBAprep_REQUIRE_SAME_NCHANNELS))
return false;
if (! dst.deep()) {
dst.error ("Cannot deep_merge to a flat image");
Expand Down

0 comments on commit 51d6ceb

Please sign in to comment.