diff --git a/src/MaaCore/Controller/AdbController.cpp b/src/MaaCore/Controller/AdbController.cpp index 7ff06f4ca7..d840621906 100644 --- a/src/MaaCore/Controller/AdbController.cpp +++ b/src/MaaCore/Controller/AdbController.cpp @@ -364,9 +364,8 @@ bool asst::AdbController::screencap(cv::Mat& image_payload, bool allow_reconnect if (temp.empty()) { return false; } - std::vector channels; - cv::split(temp, channels); - if (cv::countNonZero(channels[3] != 255) != 0) { + const auto& br = *(temp.end() - 1); + if (br[3] != 255) { // only check alpha return false; } cv::cvtColor(temp, temp, cv::COLOR_RGBA2BGR);