MCPcopy Create free account
hub / github.com/OpenShot/libopenshot / create_mask_png

Function create_mask_png

tests/EffectMask.cpp:50–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50static std::string create_mask_png(const std::vector<int>& gray_values) {
51 const std::string path = temp_png_path("mask");
52 QImage mask(static_cast<int>(gray_values.size()), 1, QImage::Format_RGBA8888_Premultiplied);
53 for (size_t i = 0; i < gray_values.size(); ++i) {
54 const int gray = gray_values[i];
55 mask.setPixelColor(static_cast<int>(i), 0, QColor(gray, gray, gray, 255));
56 }
57 REQUIRE(mask.save(QString::fromStdString(path)));
58 return path;
59}
60
61static std::string create_uniform_mask_png(int width, int height, int gray_value) {
62 const std::string path = temp_png_path("mask_uniform");

Callers 1

EffectMask.cppFile · 0.70

Calls 1

temp_png_pathFunction · 0.70

Tested by

no test coverage detected