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

Function makeTestFrame

tests/ColorMap.cpp:32–40  ·  view source on GitHub ↗

Build a simple 2×2 frame with one distinct pixel

Source from the content-addressed store, hash-verified

30
31// Build a simple 2×2 frame with one distinct pixel
32static std::shared_ptr<Frame> makeTestFrame()
33{
34 QImage img(2, 2, QImage::Format_ARGB32);
35 img.fill(QColor(50,100,150,255));
36 img.setPixelColor(0,0, QColor(10,20,30,255));
37 auto frame = std::make_shared<Frame>();
38 *frame->GetImage() = img;
39 return frame;
40}
41
42// Frame that keeps the example pixel in the bright range used by the domain tests
43static std::shared_ptr<Frame> makeBrightTestFrame()

Callers 1

ColorMap.cppFile · 0.85

Calls 1

GetImageMethod · 0.80

Tested by

no test coverage detected