MCPcopy Create free account
hub / github.com/WallBreaker2/op / WritePngFile

Function WritePngFile

tests/opencv_test.cpp:35–38  ·  view source on GitHub ↗

使用 OpenCV 写出带 alpha 的 PNG,供自动 alpha mask 测试使用。

Source from the content-addressed store, hash-verified

33
34// 使用 OpenCV 写出带 alpha 的 PNG,供自动 alpha mask 测试使用。
35bool WritePngFile(const std::wstring &path, const cv::Mat &image) {
36 const std::string narrow = std::filesystem::path(path).string();
37 return cv::imwrite(narrow, image);
38}
39
40std::wstring FindOpenCvSampleImage(const std::wstring &file_name) {
41 const auto cwd = std::filesystem::current_path();

Callers 1

TESTFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected