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

Function makeGrayFrame

tests/AnalogTape.cpp:24–34  ·  view source on GitHub ↗

Fixed helper ensures Frame invariants are respected (size/format/flags)

Source from the content-addressed store, hash-verified

22
23// Fixed helper ensures Frame invariants are respected (size/format/flags)
24static std::shared_ptr<Frame> makeGrayFrame(int w = 64, int h = 64) {
25 auto f = std::make_shared<Frame>(1, w, h, "#000000", 0, 2);
26
27 // Use premultiplied format to match Frame::AddImage expectations
28 auto img = std::make_shared<QImage>(w, h, QImage::Format_RGBA8888_Premultiplied);
29 img->fill(QColor(100, 100, 100, 255));
30
31 // Route through AddImage so width/height/has_image_data are set correctly
32 f->AddImage(img);
33 return f;
34}
35
36TEST_CASE("AnalogTape modifies frame", "[effect][analogtape]") {
37 AnalogTape eff;

Callers 1

AnalogTape.cppFile · 0.70

Calls 1

AddImageMethod · 0.80

Tested by

no test coverage detected