Merge pull request #12458 from DEEPIR:3.4

* may be an typo fix

* remove identical branch,may be paste error

* add parentheses around macro parameter

* simplify if condition

* check malloc fail

* change the condition of branch removed by commit 3041502861318c85d901e8c08226ff67898c77ed
This commit is contained in:
cyy
2018-09-07 23:43:47 +08:00
committed by Alexander Alekhin
parent 875de75327
commit 286c2c236b
8 changed files with 11 additions and 9 deletions
+2 -2
View File
@@ -207,9 +207,9 @@ bool WebPDecoder::readData(Mat &img)
{
cvtColor(read_img, img, COLOR_BGRA2BGR);
}
else if (img.type() == CV_8UC3 && m_type == CV_8UC4)
else if (img.type() == CV_8UC4 && m_type == CV_8UC3)
{
cvtColor(read_img, img, COLOR_BGRA2BGR);
cvtColor(read_img, img, COLOR_BGR2BGRA);
}
else
{