| 125 | } |
| 126 | |
| 127 | std::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 | |
| 135 | std::optional<cv::Mat> ScreencapHelper::trunc_decode_jpg(const std::string& buffer) |
| 136 | { |
nothing calls this directly
no outgoing calls
no test coverage detected