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

Method handle_draw

source/MaaFramework/Vision/VisionBase.cpp:55–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53}
54
55void VisionBase::handle_draw(const cv::Mat& draw) const
56{
57 const auto& option = MAA_GLOBAL_NS::OptionMgr::get_instance();
58 int quality = option.draw_quality();
59
60 ImageEncodedBuffer jpg;
61 if (!cv::imencode(".jpg", draw, jpg, { cv::IMWRITE_JPEG_QUALITY, quality })) {
62 LogError << "Failed to encode draw image" << VAR(name_);
63 return;
64 }
65
66 draws_.emplace_back(std::move(jpg));
67}
68
69void VisionBase::init_draw()
70{

Callers

nothing calls this directly

Calls 1

moveFunction · 0.85

Tested by

no test coverage detected