Fixed helper ensures Frame invariants are respected (size/format/flags)
| 22 | |
| 23 | // Fixed helper ensures Frame invariants are respected (size/format/flags) |
| 24 | static 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 | |
| 36 | TEST_CASE("AnalogTape modifies frame", "[effect][analogtape]") { |
| 37 | AnalogTape eff; |