MCPcopy Create free account
hub / github.com/awawa-dev/HyperHDR / getImage

Method getImage

sources/effects/Animation4Music_PulseMultiFast.cpp:55–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53};
54
55bool Animation4Music_PulseMultiFast::getImage(Image<ColorRgb>& newImage)
56{
57 if (hasResult == nullptr)
58 return false;
59
60 bool newData = false;
61 auto r = hasResult(this, _internalIndex, NULL, NULL, &newData, &_oldMulti);
62
63 if (r == nullptr || !newData)
64 return false;
65
66 ColorRgb color, empty;
67 uint32_t maxSingle, average;
68
69 if (!r->GetStats(average, maxSingle, empty, &color))
70 return false;
71
72 int red = color.Red();
73 int green = color.Green();
74 int blue = color.Blue();
75
76 newImage.fastBox(0, 0, newImage.width() - 1, newImage.height() - 1, red, green, blue);
77
78 return true;
79};
80
81bool Animation4Music_PulseMultiFast::isRegistered = hyperhdr::effects::REGISTER_EFFECT(Animation4Music_PulseMultiFast::getDefinition());

Callers

nothing calls this directly

Calls 7

GetStatsMethod · 0.80
RedMethod · 0.80
GreenMethod · 0.80
BlueMethod · 0.80
fastBoxMethod · 0.45
widthMethod · 0.45
heightMethod · 0.45

Tested by

no test coverage detected