Skip to content

Commit

Permalink
Update highgui.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
nihui authored Aug 8, 2023
1 parent 6737ebb commit b0e3ff7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions highgui/src/highgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,14 @@ bool imwrite(const String& filename, InputArray _img, const std::vector<int>& pa
else if (img.type() == CV_8UC3)
{
c = 3;
Mat img2
Mat img2;
cvtColor(img, img2, COLOR_BGR2RGB);
img = img2;
}
else if (img.type() == CV_8UC4)
{
c = 4;
Mat img2
Mat img2;
cvtColor(img, img2, COLOR_BGRA2RGBA);
img = img2;
}
Expand Down

0 comments on commit b0e3ff7

Please sign in to comment.