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

Method decode_png

source/MaaAdbControlUnit/Screencap/ScreencapHelper.cpp:127–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127std::optional<cv::Mat> ScreencapHelper::decode_png(const std::string& buffer)
128{
129 if (!check_head_tail(buffer, "\x89\x50\x4E\x47", "\xAE\x42\x60\x82")) {
130 return std::nullopt;
131 }
132 return decode(buffer);
133}
134
135std::optional<cv::Mat> ScreencapHelper::trunc_decode_jpg(const std::string& buffer)
136{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected