| 53 | }; |
| 54 | |
| 55 | bool 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 | |
| 81 | bool Animation4Music_PulseMultiFast::isRegistered = hyperhdr::effects::REGISTER_EFFECT(Animation4Music_PulseMultiFast::getDefinition()); |