MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / decode

Method decode

source/MaaAdbControlUnit/Screencap/ScreencapHelper.cpp:150–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150std::optional<cv::Mat> ScreencapHelper::decode(const std::string& buffer)
151{
152 cv::Mat img = cv::imdecode({ buffer.data(), static_cast<int>(buffer.size()) }, cv::IMREAD_COLOR);
153 return img.empty() ? std::nullopt : std::make_optional(img);
154}
155
156bool ScreencapHelper::clean_cr(std::string& buffer)
157{

Callers 11

_c_sink_agentMethod · 0.80
_c_start_app_agentMethod · 0.80
_c_stop_app_agentMethod · 0.80
_c_input_text_agentMethod · 0.80
_c_shell_agentMethod · 0.80
versionMethod · 0.80
_c_run_agentMethod · 0.80
getMethod · 0.80
_c_analyze_agentMethod · 0.80
find_adb_devicesMethod · 0.80
find_desktop_windowsMethod · 0.80

Calls 3

dataMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected